Skip to content

Commit

Permalink
Create views-view-list.html.twig
Browse files Browse the repository at this point in the history
  • Loading branch information
occupant committed Oct 14, 2022
1 parent bca0289 commit 0272bb6
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions templates/views/views-view-list.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{#
/**
* @file
* Theme override for a view template to display a list of rows.
*
* Available variables:
* - attributes: HTML attributes for the container.
* - rows: A list of rows for this list.
* - attributes: The row's HTML attributes.
* - content: The row's contents.
* - title: The title of this group of rows. May be empty.
* - list: @todo.
* - type: Starting tag will be either a ul or ol.
* - attributes: HTML attributes for the list element.
*
* @see template_preprocess_views_view_list()
*/
#}
{% if attributes -%}
<div{{ attributes }}>
{% endif %}
{% if title %}
<h3 class="text-base font-normal uppercase text-ubc-blue-sea">{{ title }}</h3>
{% endif %}

<{{ list.type }}{{ list.attributes }}>

{% for row in rows %}
<li{{ row.attributes }}>
{{- row.content -}}
</li>
{% endfor %}

</{{ list.type }}>

{% if attributes -%}
</div>
{% endif %}

0 comments on commit 0272bb6

Please sign in to comment.