This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dab69574
dab69574

Sorry for this beginner question as I am a complete newbie still in the awe and frustration phase. So I loaded the Pages plugin (#1 in free plugins) and used it to create a menu called mainMenu. I can see the yaml file in my theme's meta folder under menus. Now I'm trying to add my menu to my layout but not having any success. I don't think it's in twig format like {{ mainMenu }} so it must be the other kind like {% mainMenu %} but I can't get it to work. I figured out how to add images by wrapping them in a content file but so far no luck in adding my menu. I know it must be something easy and thanks for your help!

Eoler
Eoler

dab69574 said:

Now I'm trying to add my menu to my layout but not having any success.

Open your layout in Editor and add component [staticMenu]. Select your menu from Menu property dropdown, after that you can customize component's markup (partial) to your needs. More in the docs: https://docs.octobercms.com/2.x/cms/components.html

dab69574
dab69574

AHA! Thanks for the quick reply. I had already added the Static Menu component and tried {% component 'mainMenu' %} with no luck. The tag that worked is {% component 'staticMenu' %} which is the alias. Now I know, thanks again!

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.