Hi, everybody,
I tried onpage_menu, I like it, but I have some suggestions.
First, when I have a multipage, sometimes I like to have the menu item of only some of the pages.
I solved writing this in modular.html.twig:
{% for module in page.collection() %}
{% if module.menu != '@hide' %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
{% endif %}
{% endfor %}
but would be better to add a directive in the subpage as:
title: My subpage
hidemenu: true
# my title
my text
Second, the onpage menu items are added at the end of other itens ie:
Home | page2 | page3 | subpage1 | subpage2
I think would be better to show onpage items near the main page:
Home | subpage1 | subpage2 | page2 | page3
Best regards and thanks.
Claudio