Is this intended behaviour (behaves like this in 0.9.5 download)? Can I do something about it in my site?
The single page skeleton is using the modular.html.twig
template (because the page is called modular.md
). If you look in this template you will see that it has a section of code that overrides the main top menu so that it builds the menu from the parts of the modular page and can allow for the smooth-sliding to the parts of the page.
{% block header_navigation %}
<ul class="navigation">
{% for module in page.collection() %}
{% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
<li class="{{ current_module }}"><a href="#{{ _self.pageLinkName(module.menu) }}">{{ module.menu }}</a></li>
{% endfor %}
</ul>
{% endblock %}
However, the mobile navigation is built further down the partials/base.html.twig
template:
<div class="sb-slidebar sb-left sb-width-thin">
<div id="panel">
{% include 'partials/navigation.html.twig' %}
</div>
</div>
This is intentional as it makes no sense to have a mobile menu that displays an ‘on-page’ menu like at the top of the modular page. There’s little point to opening a panel to click a link that you could just scroll to
Anyway, changing it is of course possible but depending varies depending on what your looking for. If your truly have only a single page on your site, then you probably don’t even need the slidebar menu at all, and you can simply remove the CSS, JS, jquery initialization, and also the sb-slidebar
div too.
If you want to have multiple pages, then it might make sense to have the menu at the top of the modular page be the regular menu (not the on-page menu), and for that you can just remove the entire header_navigation
block from the modular.html.twig
file.
Thanks - I don’t have ability to do anything with this, so I will have to leave it for now as it is.
Personally I think I like the navigation there for both PC and mobile; if/when there are more pages to the site other than the long single page, then these too would be in the both navigations. Just my 2pence for now. I’ll see more when it is live…