templates/content/default.html.twig line 101

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
  2. {% block content %}
  3.     <main class="pullc">
  4.         <div class="container-xl">
  5.             <div class="row">
  6.                 <div class="col-lg-3 leftpull section-pillar d-none d-lg-block">
  7.                     <div class="section-title px-3 px-lg-3 ps-lg-0 d-flex flex-column">
  8.                         <h1 class="mb-lg-5 pe-lg-4 mt-5 text-lg-end">{{ section_title }}
  9.                         </h1>
  10.                     </div>
  11.                     {% if not document.getProperty('hide_subnav') and document.getProperty('subnav_doc') and not editmode %}
  12.                         {% set submaxDepth = 2 %}
  13.                         {% if document.getProperty('maxdepth') == 1 %}
  14.                             {% set submaxDepth = 1 %}
  15.                         {% endif %}
  16.                         <div class="d-flex justify-content-end">
  17.                             {% set nav = pimcore_build_nav({active: document, root: document.getProperty('subnav_doc')}) %}
  18.                             {{ pimcore_render_nav(nav, 'menu', 'renderMenu', {
  19.                                 maxDepth: submaxDepth,
  20.                                 ulClass: {
  21.                                     0: 'sidenav list-unstyled justify-content-end align-self-end',
  22.                                      1: 'list-unstyled subnav',
  23.                                      2: 'list-unstyled subnav',
  24.                                 },
  25.                                 expandSiblingNodesOfActiveBranch: true
  26.                             }) }}
  27.                         </div>
  28.                     {% endif %}
  29.                     {% if document.getProperty('pillar_background') %}
  30.                         {% if document.getProperty('pillar_background').getMetadata('Credit') %}
  31.                             <div class="pillar-credit">
  32.                                 Image:
  33.                                 {{ document.getProperty('pillar_background').getMetadata('Credit') }}
  34.                             </div>
  35.                         {% endif %}
  36.                     {% endif %}
  37.                 </div>
  38.                 <div class="col-lg-9 ps-lg-5 pe-lg-5 pb-4">
  39.                     {% if document.path == "/Development-Impact/Active-Projects/" %}
  40.                         <div class="breadcrumbs mt-3">
  41.                             <a href="/">{{ "Home"|trans }}</a>
  42.                             /
  43.                             <a href="/Development-Impact">Development &amp; Impact</a>
  44.                             /
  45.                             {{ document.title }}
  46.                         </div>
  47.                     {% else %}
  48.                         {% if showBreadcrumbs %}
  49.                             {% set mainNavStartNode = document.getProperty('navigation_root') %}
  50.                             {% if mainNavStartNode is empty %}
  51.                                 {% set mainNavStartNode = pimcore_document(1) %}
  52.                             {% endif %}
  53.                             {% set breadcrumbs = pimcore_build_nav({
  54.                                     active: document,
  55.                                     root: mainNavStartNode
  56.                                 }) %}
  57.                             {% do app_navigation_enrich_breadcrumbs(breadcrumbs) %}
  58.                             {% do pimcore_nav_renderer('breadcrumbs').setMinDepth(null) %}
  59.                             <div class="breadcrumbs mt-3">
  60.                                 <a href="/">{{ "Home"|trans }}</a>
  61.                                 /
  62.                                 {% if pimcore_render_nav(breadcrumbs, 'breadcrumbs') %}
  63.                                     {{ pimcore_render_nav(breadcrumbs, 'breadcrumbs')|replace({'&gt;':' / '})|raw }}
  64.                                 {% else %}
  65.                                     {{ document.title }}
  66.                                 {% endif %}
  67.                             </div>
  68.                         {% endif %}
  69.                     {% endif %}
  70.                     <h1 class="my-3">{{ pimcore_input("headline", {"placeholder":"Headline", "width": 600}) }}</h1>
  71.                     {% if document is defined and (document.id == 1 or document.id == 50) %}
  72.                         <button onclick="ml_account('webforms', '5494673', 'r7a5s3', 'show')" class="subscribe-wt d-block mt-auto">Subscribe to the CESSDA newsletter
  73.                             <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewbox="0 0 16 16">
  74.                                 <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"/>
  75.                             </svg>
  76.                         </button>
  77.                     {% endif %}
  78.                     <div class="content-body">
  79.                         {% for i in pimcore_iterate_block(pimcore_block('contentblock')) %}
  80.                             {{ pimcore_wysiwyg('content') }}
  81.                         {% endfor %}
  82.                         {{ pimcore_areablock("main_content", {
  83.                            "allowed": ["video","wysiwyg","resource-collection", "map", "staff", "text-accordion","organigramme"],
  84.                               "sorting": ["wysiwyg","text-accordion","video","resource-collection","map", "staff","organigramme"],
  85.                             }) }}
  86.                         {% if newslist|length %}
  87.                             <div class="moreinfo">
  88.                                 <h3>Related news</h3>
  89.                                 <ul>
  90.                                     {% for news in newslist %}
  91.                                         {% set detailLink = app_news_detaillink(news) %}
  92.                                         <li>
  93.                                             <a href="{{ detailLink }}">{{news.title}}</a>
  94.                                         </li>
  95.                                     {% endfor %}
  96.                                 </ul>
  97.                             </div>
  98.                         {% endif %}
  99.                     </div>
  100.                     {% if not document.getProperty('hide_subnav') and document.getProperty('subnav_doc') and not editmode %}
  101.                         <div class="d-block d-lg-none mt-3">
  102.                             <hr>
  103.                             <h3>{{ section_title }}</h3>
  104.                             {{ pimcore_render_nav(nav, 'menu', 'renderMenu', {
  105.             maxDepth: 2,
  106.             ulClass: {
  107.                 0: 'bottomnav list-unstyled',
  108.                  1: 'list-unstyled subnav',
  109.                  2: 'list-unstyled subnav',
  110.             },
  111.             expandSiblingNodesOfActiveBranch: true
  112.         }) | replace({'pimcore-navigation-renderer-menu': "mobilemenu"}) | raw}}
  113.                         </div>
  114.                     {% endif %}
  115.                 </div>
  116.             </div>
  117.         </div>
  118.     </main>
  119. {% endblock %}