We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3707
    • 241 Posts
    Try using two separate Wayfinder calls, something like:
    [[Wayfinder? &startId=`0` &rowTpl=`topmenus`]]
    [[Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]` &outerClass=`dropdown` &rowTpl=`topmenus`]]

    In the second call, the startId calls the UltimateParent snippet (this should be installed with a default install). Change the topLevel parameter to reflect your menu structure.

    Remove the innerClass parameter from the first Wayfinder call and use outerClass with the same value in the second call.
      • 33027
      • 18 Posts
      thanks,

      [[Wayfinder? &startId=`0` &rowTpl=`topmenus`]]
      [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`2`]]` &outerClass=`dropdown` &rowTpl=`topmenus` &lastClass=`` !]


      and this is what i get know

      at home page

      and with page with subpages


      and this is the source of the page

      <!-- Menu Start -->
      <ul><li>
         <a href="http://localhost/apc/" title="Welcome to Apollonia College!" >Home</a>
         
      </li>
      <li class="active">
         <a href="/apc/index.php?id=4" title="Services" >Services</a>
      
         <ul><li>
         <a href="/apc/index.php?id=7" title="United Kingdom" >UK</a>
         
      </li>
      <li>
         <a href="/apc/index.php?id=8" title="Australia" >Australia</a>
         
      </li>
      <li>
         <a href="/apc/index.php?id=9" title="Canada" >Canada</a>
      
         
      </li>
      <li class="last">
         <a href="/apc/index.php?id=10" title="United States" >US</a>
         
      </li>
      </ul>
      </li>
      <li>
         <a href="/apc/index.php?id=6" title="Register" >Register</a>
         
      </li>
      <li>
      
         <a href="/apc/index.php?id=2" title="News" >News</a>
         
      </li>
      <li class="last">
         <a href="/apc/index.php?id=3" title="Contact" >Contact</a>
         
      </li>
      </ul>
      <ul class="dropdown"><li>
         <a href="/apc/index.php?id=7" title="United Kingdom" >UK</a>
         
      
      </li>
      <li>
         <a href="/apc/index.php?id=8" title="Australia" >Australia</a>
         
      </li>
      <li>
         <a href="/apc/index.php?id=9" title="Canada" >Canada</a>
         
      </li>
      <li class="last">
         <a href="/apc/index.php?id=10" title="United States" >US</a>
      
         
      </li>
      </ul>
      
      
      <!-- Menu End -->
      


      also is there any way i can apply the &lastClass to only my submenus and not the main one?
        • 3707
        • 241 Posts
        Did you remove the [+wf.wrapper+] placeholder from the &rowTpl chunk? You don’t need that anymore.

        I’m not sure about removing the lastClass but if you don’t include a CSS rule for the lastClass in your main menu it doesn’t matter if the class name is included.
          • 33027
          • 18 Posts
          First of all many thanks for taking your time to solve this issue. yes i did and i use yours instead
            • 1343 ☆ A M B ☆
            • 2,213 Posts

            I think you need to add &level=`1` to the first wayfinder call so it’s not trying to show the submenus.

            AMDbuilder
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 33027
              • 18 Posts
              i have already done that. problem is still with the way my menus shows and also for some reason the first class which is active is not showing properly. also when i click on a submenu and when i go to a page the sub menus disappear.