taxonomy-term.html.twig
Same filename in this branch
- 9 core/profiles/demo_umami/themes/umami/templates/classy/content/taxonomy-term.html.twig
- 9 core/themes/seven/templates/classy/content/taxonomy-term.html.twig
- 9 core/themes/claro/templates/classy/content/taxonomy-term.html.twig
- 9 core/themes/bartik/templates/classy/content/taxonomy-term.html.twig
- 9 core/themes/stable/templates/content/taxonomy-term.html.twig
- 9 core/themes/starterkit_theme/templates/content/taxonomy-term.html.twig
- 9 core/themes/classy/templates/content/taxonomy-term.html.twig
- 9 core/modules/taxonomy/templates/taxonomy-term.html.twig
Same filename in other branches
- 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/content/taxonomy-term.html.twig
- 8.9.x core/themes/seven/templates/classy/content/taxonomy-term.html.twig
- 8.9.x core/themes/claro/templates/classy/content/taxonomy-term.html.twig
- 8.9.x core/themes/bartik/templates/classy/content/taxonomy-term.html.twig
- 8.9.x core/themes/stable/templates/content/taxonomy-term.html.twig
- 8.9.x core/themes/classy/templates/content/taxonomy-term.html.twig
- 8.9.x core/modules/taxonomy/templates/taxonomy-term.html.twig
- 10 core/profiles/demo_umami/themes/umami/templates/classy/content/taxonomy-term.html.twig
- 10 core/themes/stable9/templates/content/taxonomy-term.html.twig
- 10 core/themes/claro/templates/classy/content/taxonomy-term.html.twig
- 10 core/themes/starterkit_theme/templates/content/taxonomy-term.html.twig
- 10 core/modules/taxonomy/templates/taxonomy-term.html.twig
- 11.x core/profiles/demo_umami/themes/umami/templates/classy/content/taxonomy-term.html.twig
- 11.x core/themes/stable9/templates/content/taxonomy-term.html.twig
- 11.x core/themes/claro/templates/classy/content/taxonomy-term.html.twig
- 11.x core/themes/starterkit_theme/templates/content/taxonomy-term.html.twig
- 11.x core/modules/taxonomy/templates/taxonomy-term.html.twig
Theme override to display a taxonomy term.
Available variables:
- url: URL of the current term.
- name: (optional) Name of the current term.
- content: Items for the content of the term (fields and description). Use 'content' to print them all, or print a subset such as 'content.description'. Use the following code to exclude the printing of a given child element:
{{ content|without('description') }}
- attributes: HTML attributes for the wrapper.
- page: Flag for the full page state.
- term: The taxonomy term entity, including:
- id: The ID of the taxonomy term.
- bundle: Machine name of the current vocabulary.
- view_mode: View mode, e.g. 'full', 'teaser', etc.
See also
template_preprocess_taxonomy_term()
File
-
core/
themes/ stable9/ templates/ content/ taxonomy-term.html.twig
View source
- {#
- /**
- * @file
- * Theme override to display a taxonomy term.
- *
- * Available variables:
- * - url: URL of the current term.
- * - name: (optional) Name of the current term.
- * - content: Items for the content of the term (fields and description).
- * Use 'content' to print them all, or print a subset such as
- * 'content.description'. Use the following code to exclude the
- * printing of a given child element:
- * @code
- * {{ content|without('description') }}
- * @endcode
- * - attributes: HTML attributes for the wrapper.
- * - page: Flag for the full page state.
- * - term: The taxonomy term entity, including:
- * - id: The ID of the taxonomy term.
- * - bundle: Machine name of the current vocabulary.
- * - view_mode: View mode, e.g. 'full', 'teaser', etc.
- *
- * @see template_preprocess_taxonomy_term()
- */
- #}
- <div{{ attributes }}>
- {{ title_prefix }}
- {% if name and not page %}
- <h2><a href="{{ url }}">{{ name }}</a></h2>
- {% endif %}
- {{ title_suffix }}
- {{ content }}
- </div>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.