Mobile Menu for Modular Page (Grav issue)

I’ve found a solution for problem with with mobile menu in Grav CMS. Read more for details.

In Gravs default themes there are no modular sections links in the mobile menu.

To fix that simply edit user/themes/[your theme]/templates/partials/base.html.twig mobile-container section like that:

    <div class="mobile-container">
        <div class="overlay" id="overlay">
            <div class="mobile-logo">
                {% include 'partials/logo.html.twig' with {mobile: true} %}
            </div>
            <nav class="overlay-menu">
               {{ block('header_navigation') }}
            </nav>
        </div>
    </div>

Using block function instead of include you’ll repeat upper menu in the mobile container so it will be the same in both places.

This particular issue is described on Gihub:

https://github.com/getgrav/grav-plugin-admin/issues/421

Published by

Konrad Fedorczyk

Konrad Fedorczyk

I'm interested in programming and gamedev. I especially luv HTML5 and everything connected to web technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *