drupal/core/themes/bartik/templates/field--taxonomy-term-refere...

30 lines
915 B
Twig

{#
/**
* @file
* Bartik theme override for taxonomy term fields.
*
* Available variables:
* - attributes: HTML attributes for the containing element.
* - label_hidden: Whether to show the field label or not.
* - title_attributes: HTML attributes for the label.
* - label: The label for the field.
* - content_attributes: HTML attributes for the content.
* - items: List of all the field items. Each item contains:
* - attributes: List of HTML attributes for each item.
* - content: The field item's content.
*
* @see template_preprocess_field()
* @see bartik_preprocess_field()
*/
#}
<div{{ attributes.addClass('clearfix') }}>
{% if not label_hidden %}
<h3{{ title_attributes }}>{{ label }}</h3>
{% endif %}
<ul{{ content_attributes.addClass('links', 'field-items') }}>
{% for item in items %}
<li{{ item.attributes }}>{{ item.content }}</li>
{% endfor %}
</ul>
</div>