{# Logo #}
{% set logo = pimcore_image('logo', {
reload: true,
}) %}
{% set logolink = pimcore_link('link') %}
{# NavType #}
{% set navTypeSelect = pimcore_select('navType', {
reload: true,
store: [["pagetree", "Seitenbaum"], ["dynamic", "Dynamisch"]]
}) %}
{% if editmode and navTypeSelect.isEmpty() %}
{% do navTypeSelect.setDataFromResource("pagetree") %}
{% endif %}
{% if navType is not defined %}
{% set navType = navTypeSelect.getData() %}
{% endif %}
{# Shortlinks #}
{# {% set shortlinksSelect = pimcore_relations('shortlinks', {
'types': ['document'],
'subtypes': {
'document': ['page', 'link']
}
}) %} #}
{% set sidebarLinks = pimcore_block('sidebar') %}
{# {% set shortlinks = shortlinksSelect.getData() %} #}
{# {{ dump(sidebarLinks) }} #}
{# Options #}
{% if editmode %}
<div class="editmode_options">
<div class="container">
<div class="row">
<div class="col"><h3>Optionen</h3></div>
</div>
<div class="row">
<div class="col-6">
<div class="editmode-label row">
<div class="col-sm-4">Type:</div>
<div class="col-sm-8">{{ navTypeSelect | raw }}</div>
</div>
</div>
<div class="col-6">
<div class="editmode-label row">
<div class="col-sm-4">Logo:</div>
<div class="col-sm-8">{{ logo | raw }}</div>
</div>
</div>
<div class="col-6">
<div class="editmode-label row">
<div class="col-sm-4">Logo-Link:</div>
<div class="col-sm-8">{{ logolink | raw }}</div>
</div>
</div>
</div>
{# {% if navType == 'dynamic' %}
<div class="row">
<div class="col-12">
<div class="editmode-label row">
<div class="col-sm-4">Shortlinks:</div>
<div class="col-sm-8">{{ shortlinksSelect | raw }}</div>
</div>
</div>
</div>
{% endif %} #}
<div class="row">
<div class="col">
<ul>
<label>Sidebar Links:</label>
{% for i in sidebarLinks.iterator %}
{% set sidebarLinksImage = pimcore_image('sidebarImage',{'width': 100, 'height': 100}) %}
{% set link = pimcore_link('link') %}
<div class="row">
<div class="col">
{{ link | raw }}
{{ sidebarLinksImage | raw }}
</div>
</div>
{% if not editmode and link.getHref() != '' and sidebarLinksImage != null %}
<li>
<a href="{{ link.getHref() }}" target="{{ link.getTarget() }}">
<img src="https://maklertest.mvk-versicherung.de/layout/icons/dashboard.svg">
{# {{ convert_svg_to_code(app.request.getSchemeAndHttpHost(), sidebarLinksImage.getImage()) | raw }} #}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
{% endif %}
{# Render #}
{% if not editmode %}
<header class="l-header js-l-header">
<div class="l-header__wrapper">
{% set pageDocument = pimcore_document(app.request.get('pageId')) %}
{% include 'html/02_body/01_header/01_logo/logo.html.twig' with {'logo': logo, 'logolink': logolink} %}
{% include 'html/02_body/01_header/02_navigation/navigation.html.twig' with {'navType': navType, 'pageDocument': pageDocument} %}
</div>
</header>
{% endif %}