Way finder does this:
<ul>
<li><a href="/en/now" title="Now On" >Now On</a></li>
<li><a href="/en/programming" title="Programming" >Programming</a></li>
<li><a href="/en/cool" title="Cool Stuff" >Cool Stuff</a></li>
<li><a href="/community" title="Community" >Community</a></li>
<li><a href="/intranet" title="Intranet" >Intranet</a></li>
<li class="last"><a href="/en/other" title="Other Stuff" >Other Stuff</a></li>
</ul>
But I want this:
<a href="/en/now" title="Now On" class="active">Now On</a>
<a href="/en/programming" title="Programming" >Programming</a>
<a href="/en/cool" title="Cool Stuff" >Cool Stuff</a>
<a href="/community" title="Community" >Community</a>
<a href="/intranet" title="Intranet" >Intranet</a>
<a href="/en/other" title="Other Stuff" >Other Stuff</a>
(note the no list and active class also)
How can I achieve this? The only thing I can’t get to grips with ModX is Wayfinder.
Hi,
you should just be able to create a template to use instead of the default one that wayfinder uses. Add the following &rowTpl=`theTpl` to your wayfinder call and create a chunk called theTpl with something like the following in it:
<a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+][+wf.classes+]>[+wf.linktext+]</a>[+wf.wrapper+]<br />
Cheers,
Taff
Adrian Lawley: www.adrianlawley.com
Thanks, nearly there as that creates this code:
<ul><a href="/en/now" title="Now On" >Now On</a>
<a href="/en/programming" title="Programming" >Programming</a>
<a href="/en/cool" title="Cool Stuff" >Cool Stuff</a>
<a href="/community" title="Community" >Community</a>
<a href="/intranet" title="Intranet" >Intranet</a>
<a href="/en/other" title="Other Stuff" class="last">Other Stuff</a>
</ul>
I know I am bieng a real dunce here, how do I get rid of the outer UL tags, they mess up my css.
Thanks in advance,
create an outer template with noting in it
I tried &outerTpl=`` and that didn’t work...
am I doing something wrong?
Done it.
Created a chunk called NoUL and then put [+wf.wrapper+] in that chunk, then made &OuterTpl=`NoUL` and that worked... I think that is what was suggested above, I was just being thick, and put &OuterTpl=`[+wf.wrapper+]`
Thanks for your help everbody.
Hey Matthew.
Nah... you weren’t being thick, You did what I suggested (without trying it), but when I tried it, it didn’t work. I was just coming back to suggest what you already figured out.
Congratulations and good luck with your project.
-sD-
Dr. Scotty Delicious, Scientist DFPA.
It is possible to do this: [tt]&outerTpl=`@CODE:[+wf.wrapper+]`[/tt]
At least that way you don’t have to make a chunk.