I've added a subnavigation in the footer of a webpage which are the children of page info. The issue I have is that every time I need to add the collection to the page I create in the admin module like this (so on every .md file I want to have the submenu available:)
infomenu:
items:
'@page.children': /info
This is my subnav.twig file:
<div class="subnav">/
{% for p in page.collection('infomenu') %}
{% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
<a href="{{ p.url }}" class="{{ active_page }}">{{ p.menu }}</a> /
{% endfor %}
</div>
It would be nice if the collection could be defined in the blueprint, however this is not working. Is there a way so that a collection is available on every page?
thnx