Benutzer-Werkzeuge

Webseiten-Werkzeuge


web:drupal:theme:start

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Nächste Überarbeitung
Vorherige Überarbeitung
web:drupal:theme:start [2022/05/22 07:51] – angelegt - Externe Bearbeitung 127.0.0.1web:drupal:theme:start [2022/12/09 08:59] (aktuell) phoenixseo
Zeile 3: Zeile 3:
 Drupal Theme und Theme Template Files overrides. Drupal Theme und Theme Template Files overrides.
  
-===== Views Templates ===== +  * https://www.drupal.org/docs/theming-drupal 
- +  * https://www.drupal.org/docs/theming-drupal/twig-in-drupal 
-Explanation taken from: https://redcrackle.com/blog/drupal-8/theme-views-templates +  * https://www.drupal.org/docs/theming-drupal/twig-in-drupal/functions-in-twig-templates
- +
-Views default templates are located under "/core/modules/views/templates/" folder. +
- +
-Each view uses minimum of two templates: +
- +
-  * The first template is "views-view.html.twig". This template is used for all views and contains the layout for the view. (view content, header, footer, exposed form and attachments) +
-  * The second template is the style template. The default used template will vary based on the applied view style (grid, table, html list or unformatted). +
-    * Gridviews-view-grid.html.twig +
-    * Table: views-view-table.html.twig +
-    * HTML List: views-view-list.html.twig +
-    * Unformatted: views-view-unformatted.html.twig +
-  * The third template is "views-view-fields.html.twig". This template is used only if the view row style is set to "Fields". This template is responsible for looping through available fields and print fields wrappers, labels and markup. +
-  * The fourth template is "views-view-field.html.twig". This template is used only if the view row style is set to "Fields". This is the last template and is responsible for printing each field markup. +
- +
- +
-===== Override Views Templates ===== +
- +
-Each type of the view templates above can be overridden with a variety of names. The template name is a concatenation of (base template name, view machine name, view display type and view display id - separated by 2 hyphens "--"). +
- +
-The following are the possible template names sorted by precedence: +
- +
-  * [base template name]--[view machine name]--[view display id].html.twig +
-  * [base template name]--[view machine name]--[view display type].html.twig +
-  * [base template name]--[view display type].html.twig +
-  * [base template name]--[view machine name].html.twig +
-  * [base template name].html.twig +
- +
-For example; If we want to override "views-view.html.twig" template for our view, the following template names are valid: +
- +
-  * [base template name]--[view machine name].html.twig +
-  * views-view--articles-accordion--page.html.twig +
-  * views-view--page.html.twig +
-  * views-view--articles-accordion.html.twig +
-  * views-view.html.twig +
-  * views-view-field--{views machine name}--{page or block machine name}--{field name}.html.twig +
- +
-===== Fields ====== +
- +
-  * https://createdbycocoon.com/knowledge/render-individual-fields-views-templates-views-view-fieldshtmltwig +
  
 +===== Layout_Discovery Layouts =====
  
 +Eigene "Layouts" dem System durch Layout_Discovery bekanntmachen: https://www.drupal.org/docs/drupal-apis/layout-api/how-to-register-layouts
web/drupal/theme/start.1653205887.txt.gz · Zuletzt geändert: 2022/05/22 07:51 von 127.0.0.1