Hi Guys,
Have just installed modx and am up and running with no problems.
I have used Joomla in the past and am having trouble getting my head around some of modx’s concepts in regards to menus. If someone could explain how I would go about the following, Im sure things will "click" for me.
I want to know the best way to display different menu links depending on the document.
In joomla, you would create a menu/module and then assign the module to a page.
Lets say I have a Hompage Called "Home"
In the template there is a top nav bar with the code:
<div id="menucont">
<div id="menu">
[!Wayfinder?&startId=`0`!]
</div>
</div>
Which displays links to all my documents eg
Home
Cats
Dogs
Birds
Cat toys
Dog toys
Bird Feeders
Now this is where I get confused:
Lets say on the Home page I just want the links
Home
Cats
Dogs
Birds
And on the Cats page I just want
Home
Cats Toys
What is the best way/ options of doing this.
I have read the paremeters of wayfinder and have figured out you can list certain documents with [!Wayfinder?&startId=`0`&includeDocs=2,3!]
But where does that code go? chunks? template variables? A new template
I realise this is probably bleeding obvious to most, but if you could just point me in the right direction it will help me greatly, and others that may be reading also a little confused
-
☆ A M B ☆
- 24,524 Posts
If you have a TV with the type of text or texarea, you can have the Wayfinder call in the TV for each document. Or, as I often do, have @INHERIT as the default value of the TV, then for each parent document I put the Wayfinder call that I want for the whole section under that parent, since all of its children will inherit its value.
Another way to deal with this kind of situation where you want one page (Home page in this case) to always show up is to simply have the Home page link by itself, then use the CSS to make the two menus (the home page link and the rest of the Wayfinder menu) look like a single menu. Just because Wayfinder and Ditto are neat menu and listing scripts doesn’t mean that they are the only way! That’s the true MODx way: there is no "only" way
Thanks for your answers. Ill have more of a play with it and see how I go. Really appreciate your feedback