Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1887

As editor I want to see LandingPage preview with the correct template before publish

    XMLWordPrintable

Details

    • [2.2] Sprint 1

    Description

      Steps to reproduce

      1. Create two siteaccesses, e.g. eng and nor
      2. Configure separated templates for landing_page ContentType for each siteaccess*
      3. Login to the admin panel, go to the Page mode
      4. Select eng siteaccess, click Create button and select Landing Page
      5. Choose the layout which you want
      6. 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"
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            kamil.madejski@ibexa.co Kamil Madejski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: