We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20508
    • 157 Posts
    Hi Everyone,

    I have a few things I’d like to achieve with Wayfinder, but I’m not sure how. I have three main navigation links, two which are one level deep and the third which is two levels deep. The main navigation is accessible on the top of the page (via drop down menus), with another menu in the sidebar (with the same links) so you can click around the section you’re in w/o going back up to the drop-down menus. Here’s what I’d like to do:

    FYI: I included three screenshots to accompany each of my inquires (in order). wink

    1. I would like the links in the sidebar to show only the children of the parent folder, not all links. I know I can use the basic snippet call [!Wayfinder?&startId=`0`&level=1!] to say startId= the folder, but the Wayfinder snippet is shared by a couple different templates and I’d obviously like the Wayfinder to dynamically detect which folder it’s in and show only the children of that folder. I have the &hideSubMenus set to TRUE, but it still shows the other parent folders.

    2. In the only main navigation link that is two levels deep, I would like the secondary parent folders to not be links, just titles. For example:

    > How We Help (Main Navigation Link)
    >>Programs (Secondary Parent Folder) - would like this to not be a link
    - Link
    - Link
    - Link

    3. I’m using the $excludeDoc parameter to not show a couple pages. It’s working on the first page I included, but not the second (the 404 page). It’s comma separated as it should be, so I’m not sure what’s going on.

    Thank you!
    - Jess



      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can use the UltimateParent snippet in the startId parameter to set the startId. You can also use TVs with @INHERIT bindings, with the desired startId set in each parent document.

      If you use a TV with @INHERIT, don’t try to use [*id*] as the TV content in the parent document! Each child will inherit that exact TV content, meaning that it will generate a menu using its own ID as the startId for Wayfinder.
        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
        • 20508
        • 157 Posts
        @sottwell, Ultimate Parent worked beautifully, this is exactly what I was looking for. I’m so close, there’s just one more fix I need to make. I have one navigation folder that’s two levels deep, like this:

        > How We Help (Main Navigation Link) - (49)
        >>Programs (Secondary Parent Folder) - would like this to not be a link - (53)
        - Link
        - Link
        - Link

        >>Schools (Secondary Parent Folder) - would like this to not be a link - (52)
        - Link
        - Link
        - Link

        I need to get "Schools" and "Programs" (the secondary parent folder) to be bold text and not be links, they are simply to label/categorize the child pages. Lastly, I need all the child pages to show when in the Ultimate Parent (49) section. Does that make sense? undecided

        I attached accompanying screenshots illustrating the situation.

        THANK you!
        - Jess
          • 20508
          • 157 Posts
          Any advice on this - I’m so close!! I can mark the page that I don’t want to be hyperlinked as "unpublished" but then it disappears completely. This is the Wayfinder code I’m using, I can’t get it to show all the documents in the drop down: [!Wayfinder? &startId=`[[UltimateParent]]` &level=`3`!]

          It shows this:

          > How We Help (Main Navigation Link) - (49)
          >>Programs (Secondary Parent Folder) - would like this to not be a link - (53)
          >>Schools (Secondary Parent Folder) - would like this to not be a link - (52)

          And I’d like it to show this:

          > How We Help (Main Navigation Link) - (49)
          >>Programs (Secondary Parent Folder) - would like this to not be a link - (53)
          - Link
          - Link
          - Link

          >>Schools (Secondary Parent Folder) - would like this to not be a link - (52)
          - Link
          - Link
          - Link
            • 16183
            • 1,390 Posts
            Hi,

            I think one way to do this is would be to use the &categoryFoldersTpl. You would assign this template to the secondary parent folders that you do not want clickable.

            Awfully sorry, but I can barely keep my eyes open (late night here; off to bed) so cannot go into more detail. If you haven’t seen it already, step by step info on how to use the &categoryFoldersTpl template chunk can be found in the WF guide referenced in my sig. pages 47 - 50.

            I will check this thread later on today to see how you are getting on.

            cheers/k

            ps: you will need to be sure no other parent level template with a precedence over &categoryFoldersTpl is being used. If that is the case, that parent level template will be applied first before &categoryFoldersTpl. See template processing order here: http://www.muddydogpaws.com/development/wayfinder/parameters.html
              • 20508
              • 157 Posts
              Hi Kongondo, thank you for the advice. I’m really not familiar with how to use template chunks or where the "categoryFoldersTpl" parameter goes, but I’m going to look at the documentation you pointed me too. I will post my progress here. Thanks!
                • 20508
                • 157 Posts
                Ok, so I may not be doing something correctly as it’s still not working. Following the instructions from the guide you pointed me to, I did this:

                • Set the "Schools" page link attribute to: rel="category"
                • Modified my Wayfinder snippet as so: [!Wayfinder? &startId=`[[UltimateParent]]` &level=`3` &parentRowTpl=`menuParents` &parentClass=`navparents` &categoryFoldersTpl=`catHeadings`!]

                You can see the page in staging here: http://a2s38.a2hosting.com/~cfknyc/newcfk.com/how-we-help/schools/ps-243-brooklyn. It’s the word "schools" in the left-hand sidebar navigation as well as in the "How We Help" drop down. Thanks so much for your help and get some sleep!
                  • 20508
                  • 157 Posts
                  Also, I’m trying to get the child pages of "schools" and "programs" to be inline - ie, not in a secondary drop-down menu (like you see currently).
                    • 16183
                    • 1,390 Posts
                    Quote from: msflux at May 13, 2009, 03:02 PM

                    Ok, so I may not be doing something correctly as it’s still not working. Following the instructions from the guide you pointed me to, I did this:

                    • Set the "Schools" page link attribute to: rel="category"
                    • Modified my Wayfinder snippet as so: [!Wayfinder? &startId=`[[UltimateParent]]` &level=`3` &parentRowTpl=`menuParents` &parentClass=`navparents` &categoryFoldersTpl=`catHeadings`!]

                    You can see the page in staging here: http://a2s38.a2hosting.com/~cfknyc/newcfk.com/how-we-help/schools/ps-243-brooklyn. It’s the word "schools" in the left-hand sidebar navigation as well as in the "How We Help" drop down. Thanks so much for your help and get some sleep!


                    Did you actually create the template chunk catHeadings? If you did, paste its contents here please. If you did create it, did you remove the <a> tags? (the link tags)

                    cheers/k
                      • 20508
                      • 157 Posts
                      Oops, no I did not. Getting tripped up on that part. Going back to the documentation...