Please note that the forum isn't realy used anymore.

If you have questions, want support or just simply want to talk to us you can find us on slack.

 

Add extra menu/navigation

I want to add an extra menu in all the templates. I know I have to code it myself, but I have no clue where to start. Has anybody done it before? I could use some help.

You could use the navigation block module to create additional menu's. Is that what you are looking for?

Or is it a submenu with the children pages from that page that you want to display? You can include a menu in the template files. Something like this:

<nav class="sub-nav"> {$var|getsubnavigation:'page':{$page.id}:2:1} </nav>

I need a standalone menu like the mainmenu.

if i'm right the navigation block module only lets me put existing menu's in different positions in the tpl.

Can you give an example? So no submenu like I did here on the left?

An example can be found here.

Right underneath the logo you'll see the mainmenu. On the left in the slider you'll see 4 links. Aanpak, Aanleg, Onderhoud and Beheer & Advies. This menu is made up as an inhoudsblok. But I prefer it to be a real menu. It's shown on every page of the site.

On the right you'll see Kies uw sector. This is actual the footermenu. Now I'll need a third menu for the 4 items in the slider.

I think those pre-defined menu's in Fork are made in this file but I never tried creating an additional menu. I should experiment with this...

I tried to be a bit creative with the Navigation Block module to recreate that example menu by adding a new page "slidermenu" in the Single pages section. I made the 4 pages from the example as subpages from that first page. Then I made a navigation for page "slidermenu" with recursion set to 1. You can insert this navigation on different places on your pages. The navigation category and parent page are shown but you should be able to remove those by overriding the navigation block module widget template in your Fork theme. If you don't want to add the navigation on every page you create, you can also hardcode the navigation block in your tpl like in this example.

Comment

The forum is deprecated in favor of our Slack channel, which provides real-time support for your issues.

Join us on Slack here: https://fork-cms.herokuapp.com/