Seznam tagů z kategorie

This commit is contained in:
2022-08-19 18:19:11 +02:00
parent fbba83194e
commit ce7460686e
3 changed files with 32 additions and 10 deletions

View File

@ -39,6 +39,20 @@
</ul>
{% endmacro subnav %}
{% macro tags_in_category() %}
{% set_global tags = [] %}
{% for page in term.pages %}
{% for tag in page.taxonomies.tagy %}
{% set_global tags = tags | concat(with=tag) %}
{% endfor %}
{% endfor %}
{% set_global tags = tags | sort | unique %}
{% for tag in tags %}
<span class="tag"><a href="{{ get_taxonomy_url(kind="tagy", name=tag) }}">{{ tag }}</a></span>
{% endfor %}
{% endmacro tags_in_category %}
{% macro recipe_image() %}
{% for asset in page.assets %}
{% if asset is matching("[img.](jpg|png)$") %}