We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4653
    • 30 Posts
    Hello, i’m new with the Wayfinder and I have my starting problems.

    I hope someone can help me.
    I trying to do a simple Submenu Navigation but I’m not able to do it.

    I’m working with the newest Revo 2.0.4 and i installed wayfinder 2.1.1 RC1 and ultimateparent 2.0.

    Here is my template code:
    <div id="mainnav"> [[!Wayfinder? &startId=`[[UltimateParent?  &topLevel=`1`]]` &level=`1 &ignoreHidden=`TRUE` &outerTpl=`mainMenuOuter` &rowTpl=`mainMenuInner` &hideSubMenus=`TRUE`! !]]</div>
    
    <div id="subnav">[[!Wayfinder? &startID=`[[UltimateParent? &topLevel=`2`]]` &level=`2` !]]</div>
    


    My problem here is the main and the sub is showing correctly but when i click on a submenu it disappeared. So I’m no able to navigate in the submenus only in the mains.

    It’s is important, that the Submenu has a separate div because of the position.
    My next wish is, that the first Menulink is the same page as the first Submenulink.

    As Example:

    Home | Projects | About Us
    Contact | Inforamtion | Help

    The content of "About Us" and the "Contact" should be the same.

    All the best Carol

      • 22427
      • 793 Posts
      At first glimpse you have two typos: A missing " ` " and a double " ! "

      [tt]<div id="mainnav"> [[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &level=`1 &ignoreHidden=`TRUE` &outerTpl=`mainMenuOuter` &rowTpl=`mainMenuInner` &hideSubMenus=`TRUE`! !]]</div>[/tt]

      Edit:
      The correct syntax for an uncached Snippet call in Revo is [tt][[! ... ]][/tt], that is, without an exclamation mark at the closing brackets.
        • 22427
        • 793 Posts
        I assume that your main menu contains the ressources of highest level in the ressources tree. So there is no need of using UltimateParent in your first Wayfinder call.
        Try the following one (it worked for me):
         [[!Wayfinder? &startId=`0` &level=`1` .... ]]
          • 22427
          • 793 Posts
          My next wish is, that the first Menulink is the same page as the first Submenulink.
          Normally Wayfinder maps (a part of) the ressources tree. Because every ressource exists just once in the tree, you can’t let this be done automatically by Wayfinder.
          But you could add an extra link for "Contact" to the other submenu items listed by Wayfinder.
          Just modify the outerTpl of the submenu (i.e. the second Wayfinder call) in this way:
          Standard outerTpl:
          <ul [[+wf.classes]]>
          [[+wf.wrapper]]
          </ul>
          

          Modified outerTpl:
          <ul [[+wf.classes]]>
          <li [[+wf.classes]]><a href="[~99~]">Contact</a></li>
          [[+wf.wrapper]]
          </ul>
          

          where instead of 99 you have to put in the ID of the Contact ressource.
            • 4653
            • 30 Posts
            thx ottogal, the modified outerTpl is working great.
            But i still have the problem with the Submenu.
            As soon as I click on the sub, it disappeared.

            It is a multi Language Site and that’s the reason i?m working with the UltimateParent.

            DE -> Home -> Sub
            EN -> Home -> Sub


            My actually code:
            <div id="mainnav">
               [[!Wayfinder? &startId=`[[UltimateParent]]` &outerTpl=`menuContainer` &rowTpl=`menuRows` &level=`1` &excludeDocs=`24`]]
            </div>
            <hr class="color" /> 
            <div id="subnav">[[!Wayfinder? &startID=`[[UltimateParent? &topLevel=`1`]]` &outerTpl=`menuSub` &rowTpl=`menuRows` ]]
            </div>
            



            all the best Carol
              • 22427
              • 793 Posts
              My dear, that took me a while to find out: It’s just a typo!
              [tt]&startID[/tt] has to be [tt]&startId[/tt] !!
                • 4653
                • 30 Posts
                strange, but i still have the same problem.

                but perhaps you can tell me, where i can cash/uncash a snippet.
                Because i only found how i can uncash a document but no a snippet.
                I think i have to uncash the UltimatParent and to cash the Wayfinder.

                cheers
                Carol
                  • 10076
                  • 1,024 Posts
                  You do just that
                  [[!Wayfinder? &startId=`[[UltimateParent]]` &outerTpl=`menuContainer` &rowTpl=`menuRows` &level=`1` &excludeDocs=`24`]]


                  [[! = uncached [[ = cached

                  BTW I think it s normal the menu dissapears, cause you jump to another level in the doc tree (am i right?).
                  As a test you could give the startid a fixed value, see what happens. Also in the core/componenets/wayfinder/examples you will find some ready made menu s. You can "easily" create a menu with a sub menu with a single wayfinder call.
                    • 4653
                    • 30 Posts
                    Thanks Frank for the fast respond.
                    You are of cours right and the cash help me not really.
                    I know, that I can build with a sing call of wayfinder a sub or a sub sub menu.
                    But in my case I need the submenu in separated div for the position so it’s still possible to do
                    it with one call?

                    all the best carol
                      • 4653
                      • 30 Posts
                      strange but with this code it is wokring:
                      <div id="mainnav">
                        [[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &level=`1` &outerTpl=`menuContainer` &excludeDocs=`24`]]
                      </div>
                      <hr class="color" /> 
                      <div id="subnav">[[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`3`]]` &outerTpl=`menuContainer`]]
                      </div>
                      

                      perhaps someone have the same problem and this can help.
                      thx for the kind support.
                      Carol