{% extends "richie/fullwidth.html" %} {% load cms_tags i18n %} {% block content %}{% spaceless %} {% with category=current_page.category header_level=2 blogposts=current_page.category.get_blogposts courses=current_page.category.get_courses %}
{% placeholder "banner" or %}
{% trans "Banner" %}
{% endplaceholder %}

{% render_model request.current_page "title" %}

{% placeholder "description" %}
{% if blogposts %}

{% trans "Related news" %}

{% for blogpost in blogposts %} {# If the current page is a draft, show draft courses with a class annotation for styling #} {% if current_page.publisher_is_draft %} {% if blogpost.check_publication is True %} {% include "courses/cms/fragment_blogpost_glimpse.html" with blogpost=blogpost.public_extension.extended_object %} {% else %} {% include "courses/cms/fragment_blogpost_glimpse.html" with blogpost=blogpost.extended_object %} {% endif %} {# If the current blogpost page is the published version, show only the blogposts that are published #} {% elif blogpost.check_publication is True %} {% include "courses/cms/fragment_blogpost_glimpse.html" with blogpost=blogpost.public_extension.extended_object %} {% endif %} {% empty %}
{% trans "No associated blogposts" %}
{% endfor %}
{% endif %} {% if courses %}

{% trans "Related courses" %}

{% for course in courses %} {# If the current page is a draft, show draft courses with a class annotation for styling #} {% if current_page.publisher_is_draft %} {% if course.check_publication is True %} {% include "courses/cms/fragment_course_glimpse.html" with course=course.public_extension %} {% else %} {% include "courses/cms/fragment_course_glimpse.html" with course=course %} {% endif %} {# If the current course page is the published version, show only the courses that are published #} {% elif course.check_publication is True %} {% include "courses/cms/fragment_course_glimpse.html" with course=course.public_extension %} {% endif %} {% endfor %}
{% endif %} {% endwith %} {% endspaceless %}{% endblock content %}