Details
-
Bug
-
Resolution: Fixed
-
High
-
1.13.0, 1.7.7, 2.0.2
-
None
-
[2.2] Sprint 1
Description
Steps to reproduce
- Create two siteaccesses, e.g. eng and nor
- Configure separated templates for landing_page ContentType for each siteaccess*
- Login to the admin panel, go to the Page mode
- Select eng siteaccess, click Create button and select Landing Page
- Choose the layout which you want
- You can see that the preview was loaded using default template instead of the one from configuration
Note: When you publish the new Landing Page and then go to the edit mode once again, a preview will be loaded using correct template. The bug appears only on the first preview, during LP creation.
* - example code for the LP template:
eng siteaccess
{% extends base_template() %} {% block content %} eng {% if content is defined %} {{ ez_render_field(content, 'page') }} {% else %} <div data-area="static" style="min-height:300px;"></div> {% endif %} {% endblock %}
nor siteaccess
{% extends base_template() %} {% block content %} nor {% if content is defined %} {{ ez_render_field(content, 'page') }} {% else %} <div data-area="static" style="min-height:300px;"></div> {% endif %} {% endblock %}
ezplatform.yml
system: nor: languages: [nor-NO] content_view: full: landing_page: template: "AppBundle:full/nor:landing_page.html.twig" match: Identifier\ContentType: [landing_page] eng: content_view: full: landing_page: template: "AppBundle:full/eng:landing_page.html.twig" match: Identifier\ContentType: [landing_page]
ezplatform.yml or config.yml
ezstudioui: system: eng: studio_template: "AppBundle:full/eng:landing_page.html.twig" nor: studio_template: "AppBundle:full/nor:landing_page.html.twig"