We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3633
    • 84 Posts
    I have a website to build, which requires two separate navigation sections. So I am wondering if what I am asking is possible. This is how I want it to look:
    *** Top Navigation ***
    Home Page Link 2 Page Link 3 Page Link 4 etc

    *** Side Bar Navigation ***
    Page Link 1
    Page Link 2
    Page Link 3
    Page Link 4
    etc

    Can someone please tell me how I can do this? Thanks in advance.
      • 3633
      • 84 Posts
      Come on someone please answer this. Surely someone knows the answer.
        • 23571
        • 223 Posts
        I feel like I may be misunderstanding, but aren’t you just looking for two separate, but identical Wayfinder calls in your template?
          • 34072
          • 31 Posts
          Bluegum, do you need two identical menus, or do you need one menu (the top) to show one set of links and the other (the side bar) to show a completely different set of links?
            • 3633
            • 84 Posts
            What I am after is to have one menu (the top) to show one set of links and the other (the side bar) to show a completely different set of links.
              • 23571
              • 223 Posts
              It sounds like you just need to build two separate menus. I am assuming the top navigation is a reflection of your main organizational points, I think you would use a Wayfinder call for this.
              As far as your secondary navigation, you could possibly use Wayfinder for that as well, but sometimes I find it easier to use a Ditto call and it’s filter functions. It just depends on what organizational structure you want the navigation to reflect.
                • 34072
                • 31 Posts
                Hi Bluegum. Pleth posted while I was typing this, but I’m going to post anyway to expand on Pleth’s post. I’m going to assume your document tree looks something like this:


                • Home
                • Page 1
                  [list][li]Link 1
                • Link 2
                • Link 3
                • Link 4
                [/li]
                [li]Page 2[/li]
                [li]Page 3[/li]
                [li]Page 4[/li]
                [/list]

                And I’m also going to assume that you want your top menu to show all the first level links, and your sidebar menu to show the second level links. Please correct me if I’m wrong.

                In that case, your top Wayfinder call should look something like this:

                [!Wayfinder? &startId=`0` &level=`1`!]


                Your side bar Wayfinder call will look different depending on exactly what you want it to do. If you only want it to show the same menu on each page, then your call should look something like this:

                [!Wayfinder? &startId=`2` &level=`0`!]

                Your &startId value of course depends on which ID you want your menu to start from.

                If you want it to show a different menu depending on which page you’re on, your call should look something like this:

                [!Wayfinder? &startId=`[[UltimateParent]]` &level=`0`!]
                  • 23299
                  • 1,161 Posts
                  What I like to do is have a top nav with a set of fundamental links that really does not require dynamic mechanics. Link items like HOME, ABOUT and CONTACT etc. You can have these links run across the top of the top banner image etc. These are basic informational links that are not going to change really. You can also use a graphic nav sprite system using jQuery to present these links. This gives a lot of presentational flourish to this nav system. For this kind of nav system I just use basic code like this:
                  <ul id="topNav">
                  			<li><a href="index.php?id=4">contact</a></li>
                  	    	        <li><a href="index.php?id=3">area</a></li>
                  			<li><a href="index.php?id=2">about</a></li>
                  	                <li><a href=" ">home</a></li>
                  	 </ul><!-- topNav ends -->


                  The eye candy presentation is all done with CSS.

                  I then use the Wayfinder snippet to present all the dynamic content navigation, usually positioned in a sidebar. These links can be container links(documents, also known as resources) or single page links. This link system will use its own CSS.

                  You can use Wayfinder for different nav systems, but you are forced to.
                    • 3633
                    • 84 Posts
                    All of my document ids are messed up. For example: Top Nav: Home (1), Page 2 (47), Page 3 (82), Page 4 (48), and so on; Side Bar Nav: Page 1 (49), Page 2 (50), Page 3 (80), Page 4 (78), and so on. So I will be unable to place a document id as the startid. I am wondering is there a way to either, change the document id, or place the menu number in the Wayfinder?
                      • 34072
                      • 31 Posts
                      Your document ids being "messed up" won’t prevent the Wayfinder call from working, you’ll just have to make sure you’ve entered the correct id. What’s important to Wayfinder is the tree structure of your pages, and the page’s position in the menu (using the menu number you mentioned).

                      A good resource is the snippets section in the Coding Pad tutorial, which shows how to create and customise a Wayfinder call.

                      If this is your first MODx project, I suggest following the tutorial that begins here: Building a website with MODx for Newbies. I used this to familiarise myself with MODx and refer to it all the time.