We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24618
    • 13 Posts
    alright, so the default template has this to show the navigation:
    [[Wayfinder? &startId=`0`]]

    now.... that lists them... like a list... verticle.

    I’m wondering how i show navigation links in whatever way I want.... for example i want them horizontal, inside TD’s, and the TD’s have attributes that affect them.... heres an example...
    http://rcoders.com/beta/cms/ <- uses MODx and is close to what I want.... but navigation is no good...
    http://www.rcoders.com/ <- Want navigation to look like the one on that page....


    can someone explain how to do this? thanks!

      • 25663 MODX Staff
      • 12,272 Posts
      Take a look at the Wayfinder examples at http://www.muddydogpaws.com/development/wayfinder/examples.html and review the wiki notes for modifying the parameters.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24618
        • 13 Posts
        ok, thank you but I’m still pretty new to this though... so for example i want to use this one:
        http://www.muddydogpaws.com/development/wayfinder/examples/example-2.html

        how do I go about setting it up... I see the code I would use in my template file, but what are the other "Chunks Used" things underneath? do I need other files to run that?? i’m just a bit confused.

        thanks.
          • 24618
          • 13 Posts
          yeah I get the concept of chunks... i’ve seen them before called various different things on other CMS’s.... but how does that benefit my use of the navigation "class"?

          and finally, I was wondering off-topic as well how would one go about inserting PHP blocks into a MODx page?


          sorry about all of the questions... i’m just conforming to a new CMS is all... and only have a few minor questions, as most things are available from other CMS’s
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Snippets = PHP blocks. You can also have PHP code in TVs, but that’s best left for later and better understanding of everything else.

            You use a chunk to specify how you want each part of your menu to look. There is a chunk for the outer container (if you’re using an unordered list, it will have the <ul> ... </ul> tags). There is a chunk for each line item. There is a chunk for the header if you want one (made from the menu title of the parent document specified). If you download the Ditto documentation and look over the default templates you’ll see how you can manage the ouput of every part of your menu.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 24618
              • 13 Posts
              alright.... so heres what i did...

              the example I want to try and get running is:
              http://www.muddydogpaws.com/development/wayfinder/examples/example-2.html

              I added chunks and named them what they were called under "chunks used" ... like i named the first one &parentRowTpl=`cssplay_parentRow` and put its content the code below it.


              why did adding the correct chunks and placing the right code in my template to display that demo not work right?
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You named it literally "&parentRowTpl=`cssplay_parentRow`"?
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 24618
                  • 13 Posts
                  yes, i’m a damn fool... and just was messing around with it.

                  chances are they should be named whats inside the quotations, correct?


                  EDIT: I renamed them to what was in the ’’s and my navigation still doesn’t work.... what the hell do i have to do? I just /Epic Phail/ i think. please help
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Copy/paste your exact snippet call, and the exact content of your chunks. It’s 1:30 here, but if I fade out I’m sure somebody will be able to look at it and see what’s going on.

                    Those aren’t quote marks, they are backticks. Don’t even start getting in the habit of thinking of them as quote marks; that’s probably the most common beginner mistake in working with snippets!
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 24618
                      • 13 Posts
                      alright... in my template that is used on pages... heres the call for the navigation...

                      [[Wayfinder? &startId=`0` &level=`3` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_basicdd`]]


                      here are my chunks... (title is bolded... content below it... seperated by line break)

                      cssplay_basicdd
                      <link rel="stylesheet" media="all" type="text/css" href="assets/templates/wayfinder/basic_dd.css" />
                      <!--[if lte IE 6]>
                      <link rel="stylesheet" media="all" type="text/css" href="assets/templates/wayfinder/basic_dd_ie.css" />
                      <![endif]-->

                      cssplay_inner
                      <ul>
                      [+wf.wrapper+]
                      </ul>

                      cssplay_outer
                      <div[+wf.classes+]>
                      <ul>
                      [+wf.wrapper+]
                      </ul>
                      </div>

                      cssplay_parentRow
                      <li><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
                      <!--[if lte IE 6]>
                      <a class="sub" href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]
                      <table><tr><td>
                      <![endif]-->
                      [+wf.wrapper+]
                      <!--[if lte IE 6]>
                      </td></tr></table>
                      </a>
                      <![endif]-->
                      </li>

                      cssplay_row
                      <li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>

                      so whats the issue?