I need help too... I looked at the code inserted into the template for the ModxHost example and saw this...
<div id="ajaxmenu"> [[Wayfinder?startId=`0` &outerTpl=`mh.OuterTpl` &innerTpl=`mh.InnerTpl` &rowTpl=`mh.RowTpl` &innerRowTpl=`mh.InnerRowTpl` &firstClass=`first` &hereClass=``]] </div>
If I just insert [[Wayfinder?startId=`0`]] into my template it works but that’s about it. Is there a way to connect to my own stylesheets or do I need to use the chunks somehow? I’m just a little confused. Any advise would be helpful. Thanks!
Depends what you are trying to do..? trying to get the modxhost template menu over to your template or what?
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Sure you can use your own css, why not?.
just link the css as you are used to do in the head of your template.
take alook at the source that wayfinder generates to see how its all called by default and go from there.
you will notice that when you call wayfinder without any options that it just outputs a nice unsorted list for you that you can style any way you want.
if you need more like unique id’s for each <li> or other options you wil need templates for that.
for each state you can have a differend template (template in this case is a chunk that wayfinder uses to generate the menu)
take alook at www.muddydogpaws.com (nice site kylej ) and look at the examples try them on you testinstalation and play with the settings. soon you will get the hang of it.
Dimmy
And if you need to have certain class names on certain links, eg. parent items, child items, first, last, etc.. there are snippet parameters to define those. Read the documentation (available at least in modx wiki and in Kyle’s site that Dimmy pointed you). If you need more custom output than just defining class names, you can use your own templates like Dimmy said.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
When I have the following code in my template Wayfinder works:
[[Wayfinder? &startId=`0` &hideSubMenus=`TRUE`]] (this produces a basic menu in the form of a list)
I was told that in order to be able to learn more about how CSS can manipulate Wayfinder to insert something like this in my template:
[[wayfinder? &hereCss=`active`]] (Nothing shows up when I do this)
However when I combine the two the code shows so visitors can see it like this:
[[Wayfinder? &startId=`0` &hideSubMenus=`TRUE` &hereClass=`active`]]
My question is how or where do I associate my css with this snippet or is there already css that is tied with this snippet that I can just edit. I’m confused. Thank you in advance for your help.
Snippet names are case sensitive.. so use Wayfinder and not wayfinder. That’s why the middle one won’t output anything.
Quote from: mmaddux at Feb 23, 2007, 02:23 PM
However when I combine the two the code shows so visitors can see it like this:
[[Wayfinder? &startId=`0` &hideSubMenus=`TRUE` &hereClass=`active`]]
My question is how or where do I associate my css with this snippet or is there already css that is tied with this snippet that I can just edit. I’m confused. Thank you in advance for your help.
You can have your css in your site template. Or you could put it in a chunk and use &cssTpl=`chunkname` to make Wayfinder put the css to your page. In your example, when you added that &hereClass=`active` it means that every <li> that is currently active in the menu, will have a class="active" in it.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
"He can have a lollipop any time he wants to. That's what it means to be a programmer."