Hi guys, yet another problem by a newbie. Hopefully someone can help.
I've built my main navigation menu in Wayfinder, but the output seems to be screwed up, and I've so far not found anything remotely like what I'm dealing with in the documentation or forums for MODx.
Here's the output of my Wayfinder call:
<li class="active">Home<li><a href="" title=""></a></li>
<li><a href="index/articles/" title="Articles">Articles</a></li>
<li><a href="index/blog/" title="Blog">Blog</a></li>
</li><li><a href="contact.html" title="Contact Us">Contact</a></li>
As you can see, there's a blank li element inserted into the list before the closing of the first li element that doesn't close itself until the end of the third element. The reason for this I believe is that the second and third li elements are children of the first, but I can't figure out why there's a blank element at all. You can see what it's doing to my CSS at http://www.leafspiritcom
Here's the Wayfinder call itself:
[[Wayfinder? &startId=`0` &outerTpl=`mainMenu` &rowTpl=`menuRows` &parentRowTpl=`menuRows` &parentRowHereTpl=`menuActive` &activeParentRowTpl=`menuRows` &innerTpl=`menuRows` &innerRowTpl=`menuRows` &innerHereTpl=`menuActive` &hereTpl=`menuActive` &firstClass=`` &lastClass=`` &removeNewLines=`TRUE` &includeDocs`1,3,9,11`]]
As you can see, I've tried setting all the template parameters I could think of, and even using includeDocs to only show the 4 menus I want, but it still inserts a blank list element either before the end of the first li element (if Home is the active page), or in between the first and second (if another page is the current one). This is frustrating me to no end.
Here's the menuRows and menuActive chunks:
<li><a href="[[+wf.link]]" title="[[+wf.title]]">[[+wf.linktext]]</a></li>
I'm pretty sure there's no error in the template chunks, so I'm assuming it's something in the wayfinder call itself that I'm doing wrong, but I'll be damned if I know what it is.
Nevermind guys. Solved it myself Turned out that &innerTpl was trying to iterate the submenus as a separate list, so I pointed it toward a template chunk that only called wf.wrapper.