43 lines
1.5 KiB
Twig
43 lines
1.5 KiB
Twig
{% extends 'partials/base.html.twig' %}
|
|
|
|
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
|
|
|
|
{% import _self as macro %}
|
|
|
|
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
|
|
|
|
{% block header_navigation %}
|
|
{% if show_onpage_menu %}
|
|
<ul class="navigation">
|
|
{% for module in page.collection() if module.header.visible is not same as(false) %}
|
|
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
|
|
<li><a class="{{ current_module }}" href="#{{ macro.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
|
|
{% endfor %}
|
|
{% for mitem in site.menu %}
|
|
<li>
|
|
<a {% if mitem.class %}class="{{ mitem.class }}"{% endif %} href="{{ mitem.url }}">
|
|
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
|
|
{{ mitem.text }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
{{ parent() }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block hero %}
|
|
{% for module in page.collection() if module.template == 'modular/hero' %}
|
|
<div id="{{ macro.pageLinkName(module.menu) }}"></div>
|
|
{{ module.content|raw }}
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
{% for module in page.collection() if module.template != 'modular/hero' %}
|
|
<div id="{{ macro.pageLinkName(module.menu) }}"></div>
|
|
{{ module.content|raw }}
|
|
{% endfor %}
|
|
{% endblock %}
|