2

How do I load my Primary menu in my Foundation Off canvas region off-canvas position-left?

In menu--main.html.twig I have below structure for my desktop menu:

<div class="top-bar nav-desktop show-for-small-only">
  <div class="wrap">

    <div class="top-bar-left">
      <a class="site-logo" href="/site">Griffioen</a>
    </div>

    <div class="top-bar-right">
      {{ menus.menu_links(items, attributes, 0) }}
    </div>

  </div>
</div> 

I hide it on mobile with the Foundation class show-for-small-only. But now it's hiding the main menu also in the off-canvas position-left.

Is there somehow a way to load another twig template from the main menu in the Off canvas region e.g. menu--off-canvas.html.twig? Then I am able to hide the desktop menu menu--main.html.twig and show the Off Canvas menu menu--off-canvas.html.twig?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.