ul
and ol
tags when creating a List.
ul
tag is for grouping a collection of items that do not have a numerical ordering, and their order in the list is meaningless.ol
tag, the order is meaningful.{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
tag: 'ol',
content: list_items
} only %}
<ol class="e-bolt-list">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ol>