Hello dear community,
I’m encountering a problem trying to set up WayFinder. Assuming that you, readers, will already know about it, I’ll go straightforward :
I want to build a menu bar that can be compatible with another jquery menu that makes it way nicer. Therefor, I need to add classes to the <a> object, wich is obviously not loved by wayfinder.
After reading the official docs downwards, upwards, and between the lines, here’s what I tried :
-Simply adding the class a html text in the RowClass :
<li[[+wf.id]]>
<a href="[[+wf.link]]" class="wantedclass" title="[[+wf.title]]">[[+wf.linktext]]</a>
</li>
An then specifying that rowclass in the document as parameter in the wayfinder call to make sur it deosnt read the default settings. The output is working, without the class attribute :
<li><a href="index.php?id=8" title="Contact" >Contact</a></li>
So here stop me if I’m wrong, but assuming that this RowTpl is called a "template chunk" shouldn’t it be copied blindly to the output ? I don’t get it.
-Including in the wayfinder call :
When calling wayfinder, I tried adding &rowclass=`wantedclass`, and so whanged my RowTpl to :
<li[[+wf.id]]>
<a href="[[+wf.link]]" [+wf.classes+] title="[[+wf.title]]">[[+wf.linktext]]</a>
</li>
Neither worked.
As i’m not a big Jquery professionel and can’t change the code to target a li.class instead of a a.class, I’m paused right now.
And really courious to understand the logical solution, if there is one
Any advice and comment would be welcome.
Thanks
Thanks a lot Lucas, is was all because of the uppercase letter ...
I’m now having another problem.
I want to add subcfolders, that doesnt appear in the output.
My call is now the following :
[[Wayfinder? &startId=`0` &depth=`0` &limit=`20` &rowTpl=`RowTplCustom` &outerTpl=`OuterTplCustom` &innerTpl=`InnerTplCustom` &outerClass=`topnav` &innerClass=`subnav` &includeTVs=`1`]]
&depth=`0` allows avery children item to be getted and showed, right ?
InnerTplCustom:
<ul[[+wf.classes]]>[[+wf.wrapper]]</ul>
RomTplCustom:
<li[[+wf.id]][[+wf.classes]]>
<a href="[[+wf.link]]" class="wantedclass" title="[[+wf.title]]">[[+wf.linktext]]</a>
</li>
The document which is a folder is displayed as a normal single document, and the child documents are not displayed at all.
Hoping this will again look obvious to you, I think it doesnt needs more explainations.
Thanks for you help
Works perfectly thanks a lot !