Quote from: dubbs at Aug 19, 2009, 09:07 AM
Thanks - yep have that in already - it does kind of work, creates x2 UL lists... which is not really very ideal - visually does the trick... shame its not possible to get the container and all children docs together in one list together at the same level...
Tested and working (may need further testing though =>
You could "trick" WF to do what you want by splitting the opening and closing <ul></ul>. So, the opening <ul> will go into the startItemTpl like so:
<ul class="mymenu">
<li><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></li>
[+wf.wrapper+]
And the closing one will go to the outerTpl like so:
Since you also have sub-menus and you don’t want their container to be the outerTpl (since it won’t close properly - remember startItemTpl is used only once), you have to create an innerTpl like so:
<ul [+wf.classes+]>[+wf.wrapper+]</ul>
Finally, my test Wayfinder call:
[!Wayfinder? &startId=`15` &displayStart=`true` &level=`2` &startItemTpl=`splitStartItemTpl` &outerTpl=`splitOuterTpl` &innerTpl=`splitInnerTpl`!]
And the results of my testing (on MODx Evolution sample install website) - nicely formatted (see where I put the [+wf.wrapper+] of the startItemTpl - on its own line) valid code
<ul class="mymenu">
<li><a href="/index.php?id=15" title="MODx Features">Features</a></li>
<li><a href="/index.php?id=16" title="Ajax" >Ajax</a></li>
<li><a href="/index.php?id=22" title="Menus and Lists" >Menus and Lists</a></li>
<li><a href="/index.php?id=14" title="Content Management" >Manage Content</a></li>
<li class="last"><a href="/index.php?id=24" title="Extendable by design" >Extendability</a></li>
</ul>
Hope this helps
cheers/k
Edit 1: I don’t think [+wf.classes+] is applied to the start item.. So, you will need to add this in the startItemTpl e.g. class="mymenu" - see edited code above. Actually, it is but not for all class parameters. My testing shows that selfClass and hereClass are not applied. On the other hand, firstClass and parentClass get applied. Hmmm...
I don’t know the reason behind this...Could someone please confirm? Thx.
EDIT 1.1: SEE EXPLANATION HERE: http://modxcms.com/forums/index.php/topic,39123.msg238573.html#msg238573
Edit 2:Added WF call for clarity