Details
-
Story
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
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.