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

Path based content view configuration

Details

    • Candidates for next sprint

    Description

      Define paths that are searched for override templates such as <templateRoot>/content/view/<viewType>/<contentType>.html.twig.

      Example

      Resources/views/themes/standard/content/full/article.html.twig will automatically create the following view configuration:

      ezpublish:
        system:
          default:
            content_view:
              full:
                article:
                  template: "@ezdesign/content/view/full/article.html.twig"
                  match:
                    Identifier\ContentType: "article"
      

      When the path isn't sufficient, it can be completed or replaced with the usual configuration.

      Benefits

      • Overrides can be quickly created by following a deep but intuitive structure
      • It standardizes how templates are organized across companies and teams. It facilitates the transfer of knowledge or whole projects.
      • It saves time, and avoids repeating views config: the type and viewtype are very commonly part of the path, and are repeated in the view configuration
      • The actual impact depends how often very simple overrides, without extra conditions, are used in projects.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: