Merge pull request #49 from dvdlite/multi-tag

Updated card component to show all tags
This commit is contained in:
Lene Saile 2024-05-27 09:43:36 +02:00 committed by GitHub
commit 9ccd5772cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,7 +17,16 @@
if
activateTags and item.data.tags.length > 1
%}
<span class="button post-tag"> {{ item.data.tags[1] }} </span>
{# For cards with multiple tags, show all tags for the card #}
{% for tagButton in range( 0, item.data.tags.length ) %}
{# Skip "administrative" tags like 'posts' and 'feature' #}
{% if
(item.data.tags[ tagButton ] != "posts") and
(item.data.tags[ tagButton ] != "feature")
%}
<span class="button post-tag"> {{ item.data.tags[ tagButton ] }} </span>
{% endif %}
{% endfor %}
{% endif %}
</span>
</div>