jtallant/skimpy

View on GitHub
templates/partials/taxonomies.twig

Summary

Maintainability
Test Coverage
{% if entry.hasTaxonomy('categories') or entry.hasTaxonomy('tags') %}
    <div class="taxonomies">
        {% if entry.hasTaxonomy('categories') %}
            <span class="categories">
                Filed Under:
                {% for cat in entry.categories %}
                    <a href="/categories/{{ cat.slug }}">{{ cat.name }}</a>{{ loop.last ? '' : ',' }}
                {% endfor %}
            </span> <!-- .categories -->
        {% endif %}
        {% if entry.hasTaxonomy('tags') %}
            <span class="tags">
                Tagged With:
                {% for tag in entry.tags %}
                    <a href="/tags/{{ tag.slug }}">{{ tag.name }}</a>{{ loop.last ? '' : ',' }}
                {% endfor %}
            </span> <!-- .tags -->
        {% endif %}
    </div> <!-- .taxonomies -->
{% endif %}