neues theme: add blueprints.yaml
This commit is contained in:
parent
3e195f0cea
commit
56e482fb7a
|
@ -1,5 +1,25 @@
|
|||
{% if "events" in page.url %}
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags().where('event.start', 'exists') : taxonomylist.get().where('event.start', 'exists') %}
|
||||
|
||||
|
||||
{% set pages = page.collection() %}
|
||||
{% set taxonomy_count = {} %}
|
||||
|
||||
{% for p in pages %}
|
||||
{% for taxonomy in p.taxonomy %}
|
||||
{% for value in p.taxonomy[taxonomy] %}
|
||||
{% if taxonomy_count[value] is defined %}
|
||||
{% set taxonomy_count = taxonomy_count|merge({ (value): taxonomy_count[value] + 1 }) %}
|
||||
{% else %}
|
||||
{% set taxonomy_count = taxonomy_count|merge({ (value): 1 }) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% set most_common_taxonomies = taxonomy_count|sort(sort_flags.SORT_REGULAR)|reverse %}
|
||||
|
||||
|
||||
{% set taxlist = most_common_taxonomies %}
|
||||
{% else %}
|
||||
{% set taxlist = children_only is defined ? taxonomylist.getChildPagesTags() : taxonomylist.get() %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user