{% extends "base.html" %} {% load wagtailcore_tags wagtailimages_tags wagtailembeds_tags core_tags gem_tags %} {% block content %}
{% with ancestor=self.get_parent_section.get_parent_section parent=self.get_parent_section %} {% if ancestor %} {% content_is ancestor "Watch" as is_watch_ancestor %} {% content_is ancestor "Listen" as is_listen_ancestor %} {% elif parent %} {% content_is parent "Watch" as is_watch_parent %} {% content_is parent "Listen" as is_listen_parent %} {% else %} {% content_is self "Watch" as is_watch %} {% content_is self "Listen" as is_listen %} {% content_is self "News" as is_news %} {% content_is self "Cast" as is_cast %} {% endif %} {% if is_watch_ancestor or is_watch_parent or is_watch %}
{% load_child_articles_for_section self count=1 featured_in_section=True as articles %} {% if articles %}

{% trans "Featured episode" %}

{% endif %} {% load_child_articles_for_section self count=1 as next_articles %} {% if self.enable_next_section == True or parent.enable_next_section == True or ancestor.enable_next_section == True and next_articles %} {% if next_articles %} {% endif %} {% endif %}
{% if ancestor %}{% load_child_sections_for_section ancestor as sections %} {% elif parent %}{% load_child_sections_for_section parent as sections %} {% elif self %}{% load_child_sections_for_section self as sections %}{% endif %} {% for section in sections %}

{{section}}

{% load_child_articles_for_section section as articles %} {% if articles %} {% endif %} {% load_child_sections_for_section section=section as inner_sections %} {% if inner_sections %}
    {% for inner_section in inner_sections %}
  • {% load_child_articles_for_section inner_section as articles %} {% if articles %} {% endif %}
  • {% endfor %}
{% endif %} {% endfor %}
{% elif is_listen_ancestor or is_listen_parent or is_listen %} {% if is_listen %} {% load_child_sections_for_section self as subsections %} {% if subsections %}
{% endif %} {% else %}
{% if not ancestor %}
{% load_child_sections_for_section self as mini_sections %} {% if mini_sections %}

{{self}}

    {% for section in mini_sections %}
  • {% load_child_articles_for_section section as articles %} {% if articles %} {% endif %}
  • {% endfor %}
{% endif %}
{% else %}
{% load_child_articles_for_section self as articles %} {% if articles %} {% endif %}
{% endif %}
{% endif %} {% elif is_news %}
{% elif is_cast %}
{% endif %} {% endwith %}
{% endblock %}