We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19858
    • 15 Posts
    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!
      • 7923
      • 4,213 Posts
      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."
        • 19858
        • 15 Posts
        Quote from: doze at Feb 22, 2007, 03:51 PM

        Depends what you are trying to do..? trying to get the modxhost template menu over to your template or what?
        Thank you for your reply. No, I’m not trying to get the modxhost template menu over to my template. I’m just trying to understand how this snippet works. I don’t really get how or where to edit the css. Can I use my own... How? Are the chunks just used for reorganizing the way the menu is presented? I’m just really trying to figure out how to attach my own css to the snippet until I understand this more.
          • 7455
          • 2,204 Posts
          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
            follow me on twitter: @dimmy01
            • 7923
            • 4,213 Posts
            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."
              • 19858
              • 15 Posts
              Thank you for taking the time to assist me Dimmy! Here are a few questions to your answers...
              Quote from: Dimmy at Feb 22, 2007, 05:32 PM

              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.
              My css is linked to my sites template. I looked at the source for wayfinder and cannot determine how it would intertwine with my css. Is there an example you could show me of how to tie in the snippet wayfinder code with my css? Do I do that in the snippet itself?
              Quote from: Dimmy at Feb 22, 2007, 05:32 PM

              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)
              I can see how I would attach my classes or id’s to the wayfinder code within the inserted in a chunk. I haven’t tried this, but I think it makes sense.
                • 19858
                • 15 Posts
                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.

                  • 7923
                  • 4,213 Posts
                  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."
                    • 19858
                    • 15 Posts
                    Quote from: doze at Feb 23, 2007, 05:25 PM

                    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.
                    Oh, so I just create a class in my stylesheet named .active and then create parameters?
                      • 7923
                      • 4,213 Posts
                      Yes


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."