For instance, you do template things in the chunks, but how does wayfinder know what chunks are what? Is it because of their name?
You have to tell Wayfinder the names of the template chunks that you are using for your menu. You do this in your Wayfinder call. e.g. using your example above
[[Wayfinder? &startId=`51` &outerClass=`distleftnav` &hereClass=`distleftnavactive`]] &parentRowTpl=`NAME_OF_THE_PARENT_ROW_CHUNK`
You need to make sure that you are using backticks to enclose the values you give your parameters in the Wayfinder call. Maybe it was just a typo but in your example WF call I notice you also have apostrophes and not backticks throughout.
The contents of the template chunks themselves are used to structure your menu. Wayfinder will always need template chunks to construct your menus. It has 3 inbuilt templates in case you don’t define these. Two of these are always required.
The first one, the
outerTpl will be used to construct the outermost container of your menu - I like to think of this as the outermost
<ul></ul> of my menu.
The second template chunk always required is the
rowTpl. If you don’t define yours Wayfinder will use its in-built one. I like to think of this as the
<li></li> of my menus since this template is used to create the row/list items of the menus.
For parent items, you have several choices. You can use the
parentRowTpl for your parent items in conjunction with the
parentClass
I think Wayfinder by default will give active items in your menu the class
"active". You can use CSS to style this class.
The website of Wayfinder’s developer and the WF wiki both have sample template chunks. Modify these to your liking if you please.
Parent Item - parentRowTpl and parentClass should take care of this
Child 1- rowTpl should take care of these child documents
Child 2
Child 3
&outerClass=`distleftnav`
The above outerClass should give the outermost opening
<ul> tag of your menu the class
distleftnav like so
You can have CSS styles for this class as you wish. I assume you have a CSS style sheet associated with your website’s template (note: I don’t mean WF template chunks). Additionally, using CSS descendant selectors you can style the
li and
li a of your menus using this one
ul class="distleftnav"
Did you install modx with the sample content? If not, then try and do this on a local/test server. This way you will be able to see sample Wayfinder calls, chunks, etc.
I am writing this in hurry so hope it makes sense. Since you have read the documentation already, some stuff should make sense, I think...
cheers/k