Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29724

Standard Design overwrites SiteAccess-aware template settings

    XMLWordPrintable

Details

    Description

      The Standard Design overwrites SiteAccess-aware settings for Kernel templates instead of prepending them to allow Developer (or 3rd party Bundle) set templates either for his own fields or to override existing fields views.

      While this behavior can be disabled by setting ez_platform_standard_design.override_kernel_templates to false, it was not the intention to overwrite existing end-Developer or 3rd party settings.

      Steps to reproduce

      1. Install clean version of eZ Platform.
      2. Make sure that ezplatform.yaml setting ez_platform_standard_design.override_kernel_templates is set to true.
      3. Add a Twig template:
        app/Resources/views/content_fields.html.twig
        {% block ezstring_field %}
            {% spaceless %}
                Overridden!
            {% endspaceless %}
        {% endblock %}
        
      4. Configure added template:
        app/config/ezplatform.yml
        ezpublish:
            system:
                default:
                    field_templates:
                        - { template: 'content_fields.html.twig', priority: 1 }
        
      5. Clear caches.
      6. Go to homepage.

      Expected result

      The rendered name and short_name fields should contain Overridden! text.

      Actual result

      There is no change. Custom view is not used.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrew.longosz@ibexa.co Andrew Longosz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: