-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from monsieurbiz/fix/preview-template
fix(preview): Fix preview template to take theme template into account
- Loading branch information
Showing
9 changed files
with
86 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "monsieurbiz/cms-custom-theme", | ||
"title": "CMS custom theme", | ||
"extra": { | ||
"sylius-theme": { | ||
"title": "CMS custom theme" | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...ms-custom-theme/templates/bundles/MonsieurBizSyliusCmsPagePlugin/Shop/Page/show.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{% extends '@SyliusShop/layout.html.twig' %} | ||
|
||
{% set metaTitle = page.metaTitle ? page.metaTitle : page.title %} | ||
|
||
{% block title %}{{ metaTitle }}{% endblock %} | ||
|
||
{% block metatags %} | ||
{{ parent() }} | ||
<meta property="og:type" content="page" /> | ||
{% if metaTitle is not empty %} | ||
<meta property="og:title" content="{{ metaTitle }}"/> | ||
{% endif %} | ||
{% if page.metaDescription is not empty %} | ||
<meta name="description" property="og:description" content="{{ page.metaDescription }}"/> | ||
{% endif %} | ||
{% if page.metaKeywords is not empty %} | ||
<meta name="keywords" content="{{ page.metaKeywords }}"/> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div style="background-color: #f8f9fa; margin-top: 50px; padding: 50px; border-radius: 5px; margin-bottom: 20px;"> | ||
<h1 class="ui monster dividing header">{{ page.title }}</h1> | ||
<div> | ||
{{ page.content|monsieurbiz_richeditor_render_field }} | ||
</div> | ||
</div> | ||
{% endblock %} |
13 changes: 13 additions & 0 deletions
13
...m-theme/templates/bundles/MonsieurBizSyliusRichEditorPlugin/Shop/UiElement/text.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{# | ||
UI Element template | ||
type: text | ||
element fields : | ||
content | ||
align | ||
#} | ||
{% set align = element.align is defined and element.align is not empty ? element.align : 'inherit' %} | ||
{% if element is not empty and element.content is not empty %} | ||
<div style="text-align: {{align}};background-color: #dfe0e1; padding: 20px;"> | ||
{{ element.content | raw }} | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.