Details
-
Bug
-
Resolution: Unresolved
-
High
-
2.5.3
Description
Creating a new Landing Page with a template that extends different one won't render correctly in Page Builder (but editing is fine).
Steps to reproduce
1. Clean installation of eZ Platform 2.5
2. Create two template files:
app/Resources/views/pagelayout.html.twig
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> {% if content is defined %} {% set title = ez_content_name(content) %} {% endif %} <title>{{ title|default('Hello World!'|trans) }}</title> </head> <body style="padding-top: 50px; background: #6da2f7"> <div class="container" style="background: #fff"> <h1>Hello, world!</h1> {% block content %} {% endblock %} </div> </body> </html>
app/Resources/views/full/landing_page.html.twig
{% extends 'pagelayout.html.twig' %} {% block content %} <h1>{{ ez_content_name(content) }}</h1> {{ ez_render_field(content, 'page') }} {% endblock %}
3. In ezplatform.yml set:
ezpublish: system: site: content_view: full: landing_page: template: 'full/landing_page.html.twig' match: Identifier\ContentType: ["landing_page"]
4. Got to the admin, on the right menu choose "Create" and then "Landing Page".
Result
Page Builder will be opened with a blank Landing Page, but it will be displayed in default, blank Landing Page template.
Expected result
Page Builder will be opened with a blank Landing Page with a fully rendered template.
Attachments
Issue Links
- relates to
-
EZEE-3143 Support view matchers for landing page creation
- Closed