<ul id="main-menu"> [[Wayfinder? &startId=`1` &outerTpl=`Nav-Empty-Wrapper`]] </ul>
<ul id="footer-menu"> [[Wayfinder? &startId=`1` &outerTpl=`Nav-Empty-Wrapper`]] </ul>
can anyone help me with the odd & even function? i really dont get the implementation explained above.
[[Wayfinder? &startId=`0` &outerTpl=`menuContainer` &oddClass=`name_of_the_class` &evenClass=`name_of_the_class` etc etc....]]
Hi,
First, you probably want to download the official beta, Wayfinder 2.5, since the above and other changes have now been included in it. You can find it here: http://modxcms.com/forums/index.php/topic,33904.0.html
As for your question, you implement the odd and even classes just like any other WF classes. The idea as explained above is to assign classes to every other row. Say, for instance, your menu items are as follows, the first item, "Home", is odd numbered (1) since, ah, it is the first item. "About" is even numbered since it is the second item, etc, etc
Home - (odd)
About - (even)
Store - (odd)
Location - (even)
Contact - (odd)
As an example, to assign these classes, you would add them to your WF call as follows by assigning specific names to them that you can later target using CSS
[[Wayfinder? &startId=`0` &outerTpl=`menuContainer` &oddClass=`name_of_the_class` &evenClass=`name_of_the_class` etc etc....]]
cheers/k
[[Wayfinder? &startId=`[[UltimateParent]]`]]
[[Wayfinder? &startId=`[[UltimateParent]]`]]
`]]
[[UltimateParent]] [[Wayfinder? &startId=`2`]]
[[Wayfinder? &startId=`[[UltimateParent]]` &debug=`1`]]
` &debug=`1`]]
[[Wayfinder? &startId=`[!UltimateParent!]` &debug=`1`]]
Settings Settings - Settings used to create this menu. id [!UltimateParent!] level includeDocs excludeDocs ph FALSE debug TRUE ignoreHidden FALSE hideSubMenus FALSE useWeblinkUrl TRUE fullLink FALSE nl sortOrder ASC sortBy menuindex limit cssTpl FALSE jsTpl FALSE rowIdPrefix FALSE textOfLinks menutitle titleOfLinks pagetitle displayStart FALSE
[!Wayfinder? &startId=`[[UltimateParent]]` &debug=`1`!]
[!Wayfinder? &startId=`[[UltimateParent]]` &debug=`1`!]
i have code working ok on modx 1.0.4 with wayfinder 2.0 on my previous website
[[Wayfinder? &startId=`[[UltimateParent]]`]]
now doing new one with modx 1.0.5 with wayfinder 2.0.1
I can't make it work
[[Wayfinder? &startId=`[[UltimateParent]]`]]
the result of this is simple
`]]
this works fine
[[UltimateParent]] [[Wayfinder? &startId=`2`]]
this doesn't too
[[Wayfinder? &startId=`[[UltimateParent]]` &debug=`1`]]
result
` &debug=`1`]]
this at least starts WF
[[Wayfinder? &startId=`[!UltimateParent!]` &debug=`1`]]
result
Settings Settings - Settings used to create this menu. id [!UltimateParent!] level includeDocs excludeDocs ph FALSE debug TRUE ignoreHidden FALSE hideSubMenus FALSE useWeblinkUrl TRUE fullLink FALSE nl sortOrder ASC sortBy menuindex limit cssTpl FALSE jsTpl FALSE rowIdPrefix FALSE textOfLinks menutitle titleOfLinks pagetitle displayStart FALSE
this works ok but i don't wan't it uncached with extra load for the server
[!Wayfinder? &startId=`[[UltimateParent]]` &debug=`1`!]
Is it a bug or I just don't know how to fix it?