{% load wagtailcore_tags core_tags i18n %}

{% block load_tags_for_homepage %}

{% if tag %}
<div class="navigation">
  <a href="{% pageurl tag %}" class="nav-list__anchor nav-list__anchor--column">
    {{tag.title}}
  </a>
  <ul class="nav-list nav-list--column">
    {% for article in tag_articles %}
      <li class="nav-list__item nav-list__item--column">
        <a href="{% pageurl tag %}" class="nav-list__anchor nav-list__anchor--column">
          {{article.title}}
        </a>
        {% load_tags_for_article article as tags %}
        {% for tag in tags %}
          <a href="{% pageurl tag %}" class="nav-list__anchor nav-list__anchor--column">
            {{tag.title}}
          </a>
        {% endfor %}
      </li>
    {% endfor %}
  </ul>
</div>
{% endif %}
{% endblock %}
