Newer
Older
pre-www / src / layout / course-single.twig
{% set paths_base = '../..' %}
{% set bodyClasses = 'single single-course' %}

{% set course = post_type.courses.items[currentPost] %}

{% extends "base.twig" %}

{% block breadcrumbs %}

    {% set breadcrumbs_block = 
        {
            "post_type": "courses",
            "current_id": currentPost 
        }
    %}
    {% include '../blocks/breadcrumbs.twig' with {'block': breadcrumbs_block } %}

{% endblock %}

 
{% block content %}

    {# Testo #}
    {% if course.content %}
        {% set course_block_content = 
            {
                "key": "paragraph",
                "content": course.content
            }
        %}
        {% include '../blocks/paragraph.twig' with {'block': course_block_content } %}
    {% endif %}
    
    {% include '../blocks/grid-list.twig' with {'block': course.course_info } %}

    {% if course.course_modules %}  
        {% for module in course.course_modules %}
            <div class="course-module">
                <p class="course-module__title">{{module.title}}</p>
                {% include '../blocks/grid-list.twig' with {'block': module.content } %}
            </div>
        {% endfor %}
    {% endif %}
    
    
    {% include '../blocks/accordion.twig' with {'block': course.course_accordion } %}

    {% include '../blocks/featured-content-columns.twig' with {'block': course.course_focus } %}

    {# Contatti #}
    {% include '../blocks/contacts-section.twig' with {'block': course.course_contacts, 'id': 'contatti' } %}

{% endblock %}