How do we set default behavior of ALL Modular Pages to “onpage_menu: false”
Issue from github “Modular Pages Take Over The Menu” as found here https://github.com/getgrav/grav-plugin-admin/issues/72
Hi wWw;
I suppose you searching to use a modular page for your homepage but keep the regular menu instead of the onpage menu.
Modular are (dedicate) to onepage website.
To bypass this with a theme based on Quark
I copy the modular.html.twig
call it homepage.html.twig
than remove everything between
{% extends 'partials/base.html.twig' %} and {% block hero %}
So when I select homepage as Page template I could use module on this page but also keep the regular menu.
{% extends 'partials/base.html.twig' %}
{% block hero %}
{% for module in page.collection() if module.template == 'modular/hero' %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content }}
{% endfor %}
{% endblock %}
{% block body %}
<div style="margin-bottom: 122px;"></div>
{% for module in page.collection() if module.template != 'modular/hero' %}
<div id="{{ _self.pageLinkName(module.menu) }}"></div>
{{ module.content }}
{% endfor %}
<div style="padding-left: 1.4rem;">
{# check to display CC License - hibbittsdesign.org #} {# check to display git sync link in page - hibbittsdesign.org #}
{% if theme_var('display_of_git_sync_repo_link') == 'page' and not (grav.uri.param('summaryonly')) %}
{% include 'partials/git_sync_repo_link_note.html.twig' %}
{% endif %}
{% if theme_var('cc_license.enabled') %}
{% include 'partials/creative_commons_license.html.twig' %}
{% endif %}
</div>
{% endblock %}
I hope this answer your question
2 Likes