taxonomy-term.html.twig 1.37 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{#
/**
 * @file
 * Default theme implementation to display a taxonomy term.
 *
 * Available variables:
 * - url: URL of the current term.
 * - name: 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 temporarily suppress the
 *   printing of a given element:
 *   @code
 *   {% hide(content.description) %}
 *   @endcode
 * - attributes: HTML attributes for the wrapper. The 'class' attribute
 *   contains the following classes by default:
 *   - taxonomy-term: The current template type, i.e. "theming hook".
 *   - vocabulary-[vocabulary-name]: The vocabulary that this term belongs to.
 *     For example, if the term belongs to a vocabulary called "Tags" then the
 *     class would be "vocabulary-tags".
 * - page: Flag for the full page state.
 * - term: The taxonomy term entity, including:
 *   - id: The ID of the taxonomy term.
 * - view_mode: View mode, e.g. 'full', 'teaser', etc.
 *
 * @see template_preprocess()
 * @see template_preprocess_taxonomy_term()
 *
 * @ingroup themeable
 */
#}
<div id="taxonomy-term-{{ term.id }}"{{ attributes }}>
  {{ title_prefix }}
  {% if not page %}
    <h2><a href="{{ url }}">{{ name }}</a></h2>
  {% endif %}
  {{ title_suffix }}
  <div class="content">
    {{ content }}
  </div>
</div>