Newer
Older
pre-www / src / layout / archive-degrees.twig
{% if paths_base == null %}
    {% set paths_base = '..' %}
{% endif %}

{% set bodyClasses = 'archive' %}

{% extends "./base.twig" %}

{% block breadcrumbs %}

    {% set breadcrumbs_block = 
        {
            "post_type": "taxonomy_archive",
            "taxonomy": "degrees",
            "current_term": current_term
        }
    %}
    {% include '../blocks/breadcrumbs.twig' with {'block': breadcrumbs_block } %}

{% endblock %}

{% block content %}

    {% for degree in post_type.degrees.items %}
        {% if current_term in degree.terms %}
            <div class="archive-degrees-degree">

                {% set degree_marquee = 
                    {
                        "key": "marquee-images",
                        "speed": "0.003",
                        "content": {
                            "images": degree.degree_images,
                        }
                    } 
                %}
                {% include '../blocks/marquee-images.twig' with {'block': degree_marquee } %}


                <div class="grid-container">
                    <div class="columns">
                        <div class="w-full lg:w-1/2 column">
                            <h2>{{degree.title}}</h2>
                        </div>
                        <div class="w-full lg:w-1/2 column">
                            <p>{{degree.excerpt}}</p>
                        </div>
                    </div>
                </div>

                {% set degree_info_grid_list = 
                    {
                        "key": "grid-list",
                        "content": {
                            "items": [
                                degree.degree_info.content.items[0],
                                degree.degree_info.content.items[9],
                                degree.degree_info.content.items[2],
                                degree.degree_info.content.items[4]
                            ]
                        }
                    }
                %}
                {% include '../blocks/grid-list.twig' with {'block': degree_info_grid_list } %}

                <a href="{{degree.url}}" class="block-container block-link">
                    <span>Vai alla pagina del corso</span>
                </a>

            </div>
        {% endif %}
    {% endfor %}


{% endblock %}