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

    I was using dopmenu and it would display a folder as a heading in the menu. When I switched to Wayfinder it is now displaying the folder a link. Is there something I need to do to get it to display just a the name of the folder with no link.

    Please help

    Angelo
      • 15987
      • 786 Posts
      You will need to usea custom template for that with the &parentRowTpl parameter.

      create a chunk named wfParent like this:

      <li[+wf.classes+]>[+wf.linktext+][+wf.wrapper+]</li> 


      then call wayfinder with the parameter &parentRowTpl=`wfParent`
        • 21561
        • 16 Posts
        Thanks Kyle,

        I think it all starting to make sense now.

        BTW Great snippet.

        Angelo
          • 21136
          • 103 Posts
          Hello smiley

          I have created a chunk as stated above "<li[+wf.classes+]>[+wf.linktext+][+wf.wrapper+]</li>" and named it wfParent. I am calling it with "[[Wayfinder? &parentRowTpl=`wfParent` &startId=`0` &level=`1`]]" - but doesn’t seem to be doing anything (user error of course smiley

          Here is what I am try to do and please let me know where I am going wrong...

          I am using friendly URLs and my entire site is based off folders. Example:

          index.html (Home Root)
          |
          |------- dog_grooming (Folder)
          |---------- index.html
          |---------- dog_grooming_supplies.html
          |---------- dog_grooming_centers.html
          |
          |------- dog_food (Folder)
          |---------- index.html
          |---------- brandx_dog_food.html
          |---------- brandy_dog_food.html


          In the menu I want to only display entries one level deep and not every page on the site. So if I am on the root index page of the site the menu should look like this:

          index.html (Home Root)
          |
          |------- dog_grooming (Folder)
          |------- dog_food (Folder)

          I am using the "FirstChildRedirect" to force going to the index.html page in every folder.

          But currently when the menu is displayed I see:

          index.html (Home Root)
          |
          |------- dog_grooming.html
          |------- dog_food.html

          The navagation still works and you will be redirected to the index.html page but the menu displays this incorrectly. It should be:

          index.html (Home Root)
          |
          |------- dog_grooming (Folder)
          |------- dog_food (Folder)

          Now going one step further...

          When I click on one of the links and I go to the folder "dog_grooming" the menu needs to change to display the pages that are in that folder. Example:

          index.html (Home Root)
          |
          |---------- dog_grooming_supplies.html
          |---------- dog_grooming_centers.html

          Where am I going wrong? Wayfinder is new to me. I have been working with it and reading everything I can. I’m not sure what I am missing here.

          Regards,

          Ken
            • 15987
            • 786 Posts
            The reason your template is not getting used is because for the parentRowTpl to be used an item must not be at the maximum level. In other words, its children must be displayed by the menu.

            To give the menu a dynamic startId use the UltimateParent snippet, it can be found in the repository. So you would call wayfinder like [!Wayfinder? &startId=`[[UltimateParent]]` !]

            Hope that helps.
              • 21136
              • 103 Posts
              Ok - I created the chunk and here is what I used to call...

              [!Wayfinder? &startId=`[[UltimateParent]]` &level=`1` &parentRowTpl=`wfParent`!]

              I also tried other variations and nothing happens. When I use the above call nothing at all shows for the menu. I tried [[UltimateParent]] just to make sure it was returning something and it is working fine.

              Anything else that you can see?

              Can you give me a step-by-step rundown just to make sure I haven’t left anything out?

              So far Wayfinder is the only thing that has stupted me for this long without figuring it out. I am sure it is user error smiley

              Regards,

              Ken
                • 28676
                • 136 Posts
                Did you view the output that wayfinder generated? Just asking perhaps it has done what you want it to, but its a css style issue?

                ss
                  I made my first site with modx
                  ------------------------
                  http://www.shop-bright.com | Uk shopping blog
                  • 21136
                  • 103 Posts
                  I guess I’m not sure on how to do the css style part. I was letting the existing css control this. Do I have to make a new css for Wayfinder? I don’t know how to do that.

                  Regards,

                  Ken
                    • 28676
                    • 136 Posts
                    view your page source and copy and paste the menu code it generates here.

                    Then people can tell you what styles you need.

                    ss
                      I made my first site with modx
                      ------------------------
                      http://www.shop-bright.com | Uk shopping blog