Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Import your own Menu?

first-time theme

Started by Rayan 8 years ago · 2 replies · 1063 views
8 years ago

Hi everyone,

I got a "simple" question. I did a menu with html/css to show a specific menu. My problem is how to import my menu into Grav ? I know I've to import my css code into css\custom.css but since Grav use Twig I don't know how and where to import my html code. It seem to be in \templates\navigation and \templates\base (base seem to be the construction page that call other files) but I just simple don't understang Twig langage ...

In summary : I need to import my own menu but I don't know how to do it. Can someone help me with that ? Thanks a lot.

8 years ago

Menus in Grav are typically generated from a page structure. What does your menu do? Simply open specific pages?

You should have a look at the Quark or Antimatter themes to see how it's done.

8 years ago

Hi @metbril thanks you for your reply.

You can see here my menu : https://codepen.io/BirdOne/pen/rPydKy

When you mouse pass over the bouton "menu" I got sub-menu-title with sub-submenu. It seem I can't do it with Grav or I've to code in templates how the menu while show but I've no idea how to code this with twig.

So since I got my menu in HTML/CSS I'd like to "import" my menu. I already took a look at antimatter theme. The problem for me is : it's still Twig template langage.

Suggested topics

Topic Participants Replies Views Activity
General · by Sergi, 2 days ago
1 73 2 days ago
General · by themetman, 5 days ago
2 95 4 days ago
General · by Hanns Mattes, 2 weeks ago
0 148 2 weeks ago
General · by Karmalakas, 2 weeks ago
2 221 2 weeks ago
General · by Hanns Mattes, 4 weeks ago
0 282 4 weeks ago