templates/content/default.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
    {% block content %}
        <main class="pullc">
            <div class="container-xl">
    
    
                <div class="row">
                    <div class="col-lg-3 leftpull section-pillar d-none d-lg-block">
    
                        <div class="section-title px-3 px-lg-3 ps-lg-0 d-flex flex-column">
                            <h1 class="mb-lg-5 pe-lg-4 mt-5 text-lg-end">{{ section_title }}
                            </h1>
                        </div>
    
                        {% if not document.getProperty('hide_subnav') and document.getProperty('subnav_doc') and not editmode %}
                            {% set submaxDepth = 2 %}
                            {% if document.getProperty('maxdepth') == 1 %}
                                {% set submaxDepth = 1 %}
                            {% endif %}
                            <div class="d-flex justify-content-end">
                                {% set nav = pimcore_build_nav({active: document, root: document.getProperty('subnav_doc')}) %}
                                {{ pimcore_render_nav(nav, 'menu', 'renderMenu', {
                                    maxDepth: submaxDepth,
                                    ulClass: {
                                        0: 'sidenav list-unstyled justify-content-end align-self-end',
                                         1: 'list-unstyled subnav',
                                         2: 'list-unstyled subnav',
                                    },
                                    expandSiblingNodesOfActiveBranch: true
                                }) }}
    
                            </div>
    
                        {% endif %}
    
                        {% if document.getProperty('pillar_background') %}
                            {% if document.getProperty('pillar_background').getMetadata('Credit') %}
                                <div class="pillar-credit">
                                    Image:
                                    {{ document.getProperty('pillar_background').getMetadata('Credit') }}
                                </div>
                            {% endif %}
                        {% endif %}
                    </div>
                    <div class="col-lg-9 ps-lg-5 pe-lg-5 pb-4">
    
                        {% if document.path == "/Development-Impact/Active-Projects/" %}
                            <div class="breadcrumbs mt-3">
                                <a href="/">{{ "Home"|trans }}</a>
                                /
                                <a href="/Development-Impact">Development &amp; Impact</a>
                                /
                                {{ document.title }}
    
                            </div>
                        {% else %}
    
    
                            {% if showBreadcrumbs %}
                                {% set mainNavStartNode = document.getProperty('navigation_root') %}
                                {% if mainNavStartNode is empty %}
                                    {% set mainNavStartNode = pimcore_document(1) %}
                                {% endif %}
    
                                {% set breadcrumbs = pimcore_build_nav({
                                        active: document,
                                        root: mainNavStartNode
                                    }) %}
                                {% do app_navigation_enrich_breadcrumbs(breadcrumbs) %}
                                {% do pimcore_nav_renderer('breadcrumbs').setMinDepth(null) %}
    
                                <div class="breadcrumbs mt-3">
                                    <a href="/">{{ "Home"|trans }}</a>
                                    /
                                    {% if pimcore_render_nav(breadcrumbs, 'breadcrumbs') %}
                                        {{ pimcore_render_nav(breadcrumbs, 'breadcrumbs')|replace({'&gt;':' / '})|raw }}
                                    {% else %}
                                        {{ document.title }}
                                    {% endif %}
                                </div>
    
                            {% endif %}
                        {% endif %}
    
                        <h1 class="my-3">{{ pimcore_input("headline", {"placeholder":"Headline", "width": 600}) }}</h1>
                        {% if document is defined and (document.id == 1 or document.id == 50) %}
    
                            <button onclick="ml_account('webforms', '5494673', 'r7a5s3', 'show')" class="subscribe-wt d-block mt-auto">Subscribe to the CESSDA newsletter
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewbox="0 0 16 16">
                                    <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zM4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5H4.5z"/>
                                </svg>
                            </button>
    
                        {% endif %}
                        <div class="content-body">
                            {% for i in pimcore_iterate_block(pimcore_block('contentblock')) %}
    
                                {{ pimcore_wysiwyg('content') }}
                            {% endfor %}
    
                            {{ pimcore_areablock("main_content", {
                               "allowed": ["video","wysiwyg","resource-collection", "map", "staff", "text-accordion","organigramme"],
                                  "sorting": ["wysiwyg","text-accordion","video","resource-collection","map", "staff","organigramme"],
                                }) }}
    
                            {% if newslist|length %}
                                <div class="moreinfo">
                                    <h3>Related news</h3>
    
                                    <ul>
    
    
                                        {% for news in newslist %}
                                            {% set detailLink = app_news_detaillink(news) %}
    
                                            <li>
                                                <a href="{{ detailLink }}">{{news.title}}</a>
                                            </li>
    
    
                                        {% endfor %}
                                    </ul>
                                </div>
                            {% endif %}
                        </div>
    
                        {% if not document.getProperty('hide_subnav') and document.getProperty('subnav_doc') and not editmode %}
    
                            <div class="d-block d-lg-none mt-3">
                                <hr>
    
                                <h3>{{ section_title }}</h3>
    
    
                                {{ pimcore_render_nav(nav, 'menu', 'renderMenu', {
                maxDepth: 2,
    
                ulClass: {
                    0: 'bottomnav list-unstyled',
                     1: 'list-unstyled subnav',
                     2: 'list-unstyled subnav',
                },
                expandSiblingNodesOfActiveBranch: true
            }) | replace({'pimcore-navigation-renderer-menu': "mobilemenu"}) | raw}}
    
                            </div>
    
                        {% endif %}
    
    
                    </div>
                </div>
            </div>
    
    
        </main>
    {% endblock %}