{% extends "base.html" %}
{% load cache wagtailcore_tags core_tags wagtailimages_tags wagtailembeds_tags static comments molo_forms_tags  el_pagination_tags gem_tags %}

{% block content %}
    {% bannerpages position=0 %}
    {% gembannerpages %}
  {% if not settings.core.SiteSettings.enable_tag_navigation %}
    {% forms_list personalisable_form=True %}
    {% hero_article %}
    {% latest_listing_homepage num_count=6 %}
    {% section_listing_homepage %}
    {% media_listing_homepage %}
    {% bannerpages position=1 %}
    {% bannerpages position=2 %}
    {% forms_list only_direct_forms=True %}
    {% forms_list only_yourwords=True %}
    {% forms_list only_linked_forms=True %}
    {% bannerpages position=3 %}
  {% else %}
    {% get_tag_articles tag_count=4 as tag_nav_data %}
    {% paginate 15 tag_nav_data.latest_articles as latest_articles %}

    {% forms_list personalisable_form=True %}

    {% include 'core/tags/latest_listing_homepage.html' with articles=latest_articles|slice:"0:3" %}

    {% forms_list only_direct_forms=True %}

    {% forms_list only_linked_forms=True %}

    {% bannerpages position=1 %}

    {% tag_menu_homepage %}

    {% include 'core/tags/latest_listing_homepage.html' with articles=latest_articles|slice:"3:6" %}

    {% include "patterns/components/article-teasers/sp_variations/carousel-teaser-listing.html" with tag=tag_nav_data.tags_list.0.0 tag_articles=tag_nav_data.tags_list.0.1 %}
  {% endif %}
{% endblock %}
