{% extends 'partials/base.html.twig' %} {% if page.parent.parent.header.hide_next_prev_page_buttons is defined %} {% set hide_next_prev_page_buttons = page.parent.parent.header.hide_next_prev_page_buttons %} {% elseif page.parent.header.hide_next_prev_page_buttons is defined %} {% set hide_next_prev_page_buttons = page.parent.header.hide_next_prev_page_buttons %} {% endif %} {% block content %} {% set activetag = uri.param('filter') %}
{% if not(page.header.hide_page_title) and not(grav.uri.param('hidepagetitle')) %}

{{ page.title }}

{% endif %} {{ page.content|raw }} {% if not(hide_next_prev_page_buttons) %}

{% set siblings = page.collection({ 'items': { '@page.children.visible': page.parent.route } }) %} {% set children = page.collection({ 'items': { '@page.children.visible': page.route } }) %} {% if not(page.template == 'sections') %} {% if not siblings.isFirst(page.path) %} {% if children | length != 0 %} {% if (siblings.nextSibling(page.path).children | last) %} {{ siblings.nextSibling(page.path).children|last.menu }} {% else %} {{ siblings.nextSibling(page.path).menu }} {% endif %} {% else %} {% if siblings.nextSibling(page.path).url %} {{ siblings.nextSibling(page.path).menu }} {% endif %} {% endif %} {% else %} {% if not(page.parent.template == 'sections') %} {{ page.parent.menu }} {% endif %} {% endif %} {% if not siblings.isLast(page.path) %} {% if children | length == 0 %} {% if siblings.prevSibling(page.path).url %} {{ siblings.prevSibling(page.path).menu }} {% endif %} {% else %} {{ page.children|first.menu }} {% endif %} {% else %} {% if not(page.parent.template == 'sections') %} {% set siblings = page.collection({ items: { '@page.children.visible': page.parent.parent.route } }) %} {% if not siblings.isLast(page.parent.path) %} {{ siblings.prevSibling(page.parent.path).menu }} {% endif %} {% else %} {% if page.children.count != 0 %} {{ page.children|first.menu }} {% endif %} {% endif %} {% endif %} {% endif %} {% endif %}

{% endblock %}