Greetings.
Presently, I have a page header whose content is simply HTML captured from a page source and made into a widget. It’s the red banner and gray dropdown shown below.
Now that I’m reading up on Main Navigation, I see that this is not the way to go.
I’ve already built all of the pages shown in the drop down.
What I want to do is use the #renderViewlet( event=“core.navigation.mainNavigation”, args={ depth=2 } )# to do two things:
- Build the horizontal menu that spans across the top of every page
- Build sub menus applicable to individual top level menu items.
How would I go about this?
Here’s a snapshot of what my site tree presently looks like:
Please disregard the ‘inactive’ statuses for now.
There are basically two menus:
Tha main menu:
This is mainly what is on the top of your page INCLUDING all dropdowns. Mostly this is done as a cascading ul/li/ul/li structure.
Means: All the code is generated in the mainmenu and the logic for the drop down and the layout for this is done with js and css.
in views/core/navigation/mainNavigation.cfm you see that the view is called recursively to generate the ul/li structure.
The secondary menu
This is what you mostly have directly on a subpage, eg. on the left side, showing the pages below the current page you’re on.
Hope this helps for explanation.
Best
Michi
Yes, thank you.
I guess I wrote a lot and didn’t communicate my main intent 
What I don’t quite understand is how exactly I set up my Preside admin site tree such that the views/core/navigation/mainNavigation.cfm reads it correctly and reproduces in on-screen.
For example, I wouldn’t necessarily want every page on the site to be included in the top level navigation.
The documentation mentions the menu is based off the site tree?
Best
Ah, that’s super simple.
When editing a page in the Site tree you see the tab Navigation. Here you can define if a page will be shown in the main or submenu.

But: This is only if you’re NOT logged in as admin. If you’re logged in this setting is ignored and leads to confusion sometimes.
Best
Michi
I see. So maybe it would help to have the public facing site open in Firefox and the admin open in Chrome. That might mitigate confusion.
Question: That red navigation banner in my previous post … as mentioned, I want to display that on the top of every page. How do I accomplish that?
Normally in a non-CMS site, I might do an include or something. How would I do it in Preside?
Also, I’ll be on vacation next week so will not be attending to anything work related. 