{% 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",
            "show_terms": true,
            "current_id": currentPost,
            "classes": "breadcrumbs--spacing-2"
        }
    %}
    {% 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 %}

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

{% endblock %}