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

As a Developer I want eZ Design Engine to set theme fallback directory

    XMLWordPrintable

Details

    • Icon: Story Story
    • Resolution: Won't Fix
    • Icon: High High
    • n/a
    • 2.2.0-beta1
    • None

    Description

      Before eZ Design Engine 2.0 and EZP-29237 fix, app/Resources/views was a theme override directory, which led to quite unexpected results for which there was no other solution apart from deleting that template or changing bundle's template name.

      As a follow-up improvement of EZP-29237 it was suggested that we need some kind of fallback for themes directory (set by default, not by explicit configuration - to improve DX).

      For sure we can do it for application views directory app/Resources/views since it is no longer an override.

      What is questionable is making every bundle's Resources/views directory as a fallback one.
      So far we did it manually to EzPublishCoreBundle and EzPlatformAdminUiBundle, which some members of the Community were partially against.

      Pros of such change would be easier theming of 3rd party bundles.

      Cons:

      • can lead to unexpected results, as developers usually don't know all the bundles used by our system, so might see a mix of their templates and 3rd party template that doesn't make sense and occured only because of a name collision,
      • would be highly dependent on the order of bundles in case of name collisions (if you have your bundle that uses the same template name as some other 3rd party bundle, you'd be forced to place it in correct order),
      • performance: while list of directories is created at the Container compile time, traversing through them to look for a template is done per request AFAICS, so that might be an issue (unless it's cached by Twig somehow).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: