forked from KEMT/zpwiki
16 lines
697 B
Twig
16 lines
697 B
Twig
|
{% set articles = taxonomy.findTaxonomy({'category': category}).order('title') %}
|
||
|
<section class="topiclist">
|
||
|
<h2>
|
||
|
{# Check to see if a dedicated category page exists #}
|
||
|
{% set slug = category|hyphenize|url_encode %}
|
||
|
{% set p = page.find('/categories/'~slug) %}
|
||
|
{% if p == null %}
|
||
|
<a href="{{ base_url }}/taxonomy?name=category&val={{ category|url_encode }}">{{ category|e }}</a>
|
||
|
{% else %}
|
||
|
<a href="{{ base_url }}/categories/{{slug}}">{{ category|e }}</a>
|
||
|
{% endif %}
|
||
|
<span class="count">({{ articles|length }})</span>
|
||
|
</h2>
|
||
|
{% include 'partials/topiclist.html.twig' with {'articles': articles, 'maxcount': maxcount} %}
|
||
|
</section>
|