Chris@0: {# Chris@0: /** Chris@0: * @file Chris@0: * Default theme implementation for an item list. Chris@0: * Chris@0: * Available variables: Chris@0: * - items: A list of items. Each item contains: Chris@0: * - attributes: HTML attributes to be applied to each list item. Chris@0: * - value: The content of the list element. Chris@0: * - title: The title of the list. Chris@0: * - list_type: The tag for list element ("ul" or "ol"). Chris@0: * - wrapper_attributes: HTML attributes to be applied to the list wrapper. Chris@0: * - attributes: HTML attributes to be applied to the list. Chris@0: * - empty: A message to display when there are no items. Allowed value is a Chris@0: * string or render array. Chris@0: * - context: A list of contextual data associated with the list. May contain: Chris@0: * - list_style: The custom list style. Chris@0: * Chris@0: * @see template_preprocess_item_list() Chris@0: * Chris@0: * @ingroup themeable Chris@0: */ Chris@0: #} Chris@0: {% if context.list_style %} Chris@0: {%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %} Chris@0: {% endif %} Chris@0: {% if items or empty %} Chris@0: {%- if title is not empty -%} Chris@0:

{{ title }}

Chris@0: {%- endif -%} Chris@0: Chris@0: {%- if items -%} Chris@0: <{{ list_type }}{{ attributes }}> Chris@0: {%- for item in items -%} Chris@0: {{ item.value }} Chris@0: {%- endfor -%} Chris@0: Chris@0: {%- else -%} Chris@0: {{- empty -}} Chris@0: {%- endif -%} Chris@0: {%- endif %}