Hello all. I have installed ModX and so far I LOVE it. A couple things I’ll need help with down the line but for now, I just have one question relating to menus.
I am using the [[Wayfinder? &startId=`0`]] to display a menu linking all pages on top of the website.
my temp URL is www.nicklavoie.com/cms2/
I want to add another menu to the left hand side of the website (you’ll see a menu now but it’s only href=# items and it’s in HTML.
How can add a new menu to the left hopefully using the same [[Wayfinder? &startId=`0`]] code and attach new pages to this one instead of the top menu?
thanks!
Are those sections already in the document tree?
If you make a document/container non-published name something
like "sideMenu" or the like then you can just add another Wayfinder
call with the container ID as the $startId...
sideMenu (x)
Certificates (12)
Environmental Impact (13)
Safety Polixy (14)
...
[[Wayfinder? &startId=`x`]]
Place the call in the sidebar or wherever you want!
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
I’m sorry, I am not good enough at this CMS system yet and I do not understand how to accomodate the changes you suggested
I did try and add [[Wayfinder? &startId=`5`]] to the left side of my HTML Document but all new menu items I add all go on the top menu and nothing shows up on the side. kind of frustrated lol
This is what I do:
MODx gives you by default a content area in every page, which
is a Template Variable on its own - [*content*]
The first thing I do is I create one template where I place other
template variables according to the layout I am going to use:
[*header*], [*navigation*], [*sidebar*], [*footer*]. And you can use
divs or other structural elements to create the layout, I personally
use a grid system called BlueTrip (derivative from BluePrint and Tripoli).
Then I create analogous chunks and place them as defaults for the above
Template Variables: {{header}}, {{navigation}}, {{sidebar}}, {{footer}}.
In this chunks I place HTML and snippets. I this case I place one Wayfinder
call in the navigation chunk and one Wayfinder call in the sidebar chunk.
Now, for this to work you have to know that the &stardId paramenter of Wayfinder
displays all the documents that are under that "container". So [[Wayfinder? &startId=`0`]] will show in the menu everything under 0 but will not include 0.
Everything that you have checked as "appear in menu".
[[Wayfinder? &startId=`5`]] will do the same starting from container 5. Read on
the Wayfinder docs for how to select the level or how deep on your tree structure
it will show.
Your tree should be like this:
Name of website (0) - does not say zero, but it is zero
Home (1)
About (2)
Products (3)
Services (4)
sideMenu (5) - this is a document set as container and "not shown in menu"
Certificates (12)
Environmental Impact (13)
Safety Polixy (14)
That is it, I hope this helps. Read the MODx documentation for developers and
also the Wayfinder docs for more info... it gets easier with time and we are
all learning here...
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
it is well explained thanks for the help but I must admit, i feel stupid. I still can’t get this to work
what I’ve done is create a new item in the tree called "sidebar" and unchecked the show in menu, made it menu item 5 and in the code I put the [[wayfinder thing Id=’5’]]
added a new page and made it item number 6 and it still shows up on the top menu.
The numbers that you should use are the document IDs in the tree
no the menu item number...
Website: www.mercologia.com
MODX Revo Tutorials: www.modxperience.com
MODX Professional Partner
awesome I got this to finally work!!
thanks a LOT guys!