We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35843
    • 34 Posts
    Okay i'm kind of new to wayfinder. I understand some of it but not sure why this is not working.
    I'm basically trying to setup navigation with a submenu however the sub-pages are not being displayed.

    Any help would be appreciated. I'm not sure what's going on with it.

    Thanks
    Riz

    Here is my template which is an external file in parts. This was how the site is built

    [[IncludeTemplate? &tpl=`site/parts/head.tpl`]]
    <body>
    <div id="Wrapper">
    [[includeTemplate? &tpl=`site/parts/tpl`]]
    <div id="HomeMainImg">
       [[getHomeMainSection]]
       </div>
        
       <div id="HomeMainImg">
          [[getHomeMainSection]]
       </div>
        
       <div id="SectionMenu">
          [!Wayfinder? &level=`1` &startId=`[[GetField? &field=`id` &parent=`1` &parentLevel=`0`]]`!]
       </div>
           
        
       <div id="ProductMain" class="clearfix">
          <div id="ProductSide">
             [[ProductLogo]]
             <nav id="Product Menu">
                [!Wayfinder? &startId=`676` &level=`2` &hideSubMenus=`1`!]
             </nav>
        
          </div>
        
          <div id="ProductContent">
             [[GetField? &field=`ProductBanner` &docid=`200`]]
             <div id="ProductBreadcrumbs">
                   [[BreadCrumbs]]
             </div>
             
                        <div class="content">
                        [+phx:if=`[*longtitle:len*]`:gt=`1`:then=
                            `<h1>[*longtitle*]</h1>`
                        :else="+]
                        [*content*]
                    </div>
       </div>
          <div>
            [[IncludeTemplate? &tpl=`site/parts/footer.tpl`]]
          </div>
         
        [[IncludeTemplate? &tpl=`site/parts/bottom.tpl`]]
         
    </body>
    </html>
    


    Xonerate
    [[IncludeTemplate? &tpl=`site/xonerate.tpl`]]
    


    Xonerate Container
    [[FirstChildRedirect]]
    


    XonerateParentRowTpl
    	
    <li[+wf.classes+]>
        <a href="[+wf.link+]" title="[+wf.title+]" class="parent">[+wf.linktext+]</a>
        [+wf.wrapper+]
    </li>
    
      • 19369
      • 1,098 Posts
      How is your website structure?
      What is the output of Wayfinder?
      Is XonerateParentRowTpl a Wayfinder tpl? If it is, you need to declare it on the Wayfinder call.

      Here you may learn more about Wayfinder:
      http://www.gregorysmart.com/downloads/The_almost_Complete_Guide_to_Constructing_Menus_in_MODx_Using_Wayfinder.pdf


      http://muddydogpaws.com/development/wayfinder/features.html


      http://wiki.modxcms.com/index.php/Wayfinder


      Also, in the first wayfinder call, I think that you can achive the same result with the [*parent*] placeholder:
            [!Wayfinder? &level=`1` &startId=`[*parent*]`!]
        • 35843
        • 34 Posts
        hey

        thanks for the tips.
        XonerateParentRowTpl is isn't a Wayfinder tpl. This is how it was done previously.
        I'm going to try using the [*parent*] placeholder and perhaps see if that works.

        This is the output of wayfinder.
         <div id="ProductMain" class="clearfix">
        			<div id="ProductSide">
        
                        <div id="ProductLogoSpacer"></div>
        				<nav id="ProductMenu">
        					<ul><li class="active"><a href="/www/arysta-na/us-turf-and-ornamental/products/xonerate/overview/how-xonerate-works.html" title="How Xonerate Works" >How Xonerate Works</a></li>
        <li class="last"><a href="/www/arysta-na/us-turf-and-ornamental/products/xonerate/overview/trial-information.html" title="Trial Information" >Trial Information</a></li>
        </ul>
        					
        				</nav>
        			</div>
        			<div id="ProductContent" >
        				
        				<div id="ProductBreadcrumbs">
        
        				    <span class="B_crumbBox"><span class="B_firstCrumb"><a class="B_homeCrumb" href="/www/arysta-na/home.html" title="Arysta LifeScience, LifeScience">Home</a></span> » <a class="B_crumb" href="/www/arysta-na/us-turf-and-ornamental.html" title="US Turf and Ornamental">US Turf and Ornamental</a> » <a class="B_crumb" href="/www/arysta-na/us-turf-and-ornamental/products.html" title="Products">Products</a> » <a class="B_crumb" href="/www/arysta-na/us-turf-and-ornamental/products/xonerate.html" title="xonerate">XONERATE</a> » <a class="B_crumb" href="/www/arysta-na/us-turf-and-ornamental/products/xonerate/overview.html" title="overview">Overview</a> » <span class="B_lastCrumb"><span class="B_currentCrumb">How Xonerate Works</span></span></span>
        
        				</div>
        				<div class="content">
                            <h1>how xonerate works</h1>
        				    <p>copy, time, lapse, animation sequences.</p>
        <p>How Xonerate works</p>
                        </div>
        
          • 19369
          • 1,098 Posts
          Wayfinder is working fine. If you have troubles with it you should explain better how you want it to behave, what should be the output, etc. [ed. note: microcipcip last edited this post 14 years, 9 months ago.]
            • 35843
            • 34 Posts
            Sorry for the miscommunication.

            The purpose of the usage of wayfinder is to create a navigation menu whereby the first 2 links that contain subpages are to be displayed upon clicking their parent. This can also be used for any additional submenus located in that navigation. Currently wayfinder is only outputting the 2 parent links and nothing else, not the parent links and their subchildren.

            Ex:
            Overview
            ----->more information
            ----->where to get it
            Downloads
            ----->pdf
            ----->files
            ----->word docs
            About
            Contact

            Is that clearer?


            Thanks
              • 19369
              • 1,098 Posts
              I don't understand very well, but I guess you are looking for a fixed menu based on tree level depth. You may try to display it with the UltimateParent Snippet, which is pre-installed on MODX Evolution:
              [!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &level=`2` &hideSubMenus=`1` !]


              Try to play with the value of &topLevel and see if you get what you are looking for.
                • 35843
                • 34 Posts
                hey

                thanks for the help. I was able to solve most of it. It was the placement of my code and also the parent level parameter was wrong. However I have another problem with it now.
                I am unable to hide that actual parts of the submenu. When I navigate to the page, the submenus are already showing unless I click another link. In addition, when I click the top level heading, I want to be able to see the content that is in that and i'm not sure how to achieve it.

                If this sounds confusing let me know, i'll try rewording it.

                Ex:
                Overview ( want to be able to see this content )
                --->How Xonerate works
                ---->Trial Information
                Usage and Application ( want to be able to see this content, don't want this to be able to show unless clicked )
                --->Protocols
                Diseases Controlled
                More Information
                Sell Sheets


                I tried adding &hideSubMenus=`1` but that didn't prove to completely resolve the situation.


                
                Wayfinder Snippet call
                
                <nav id="ProductMenu">
                					[!Wayfinder? &startId=`676` &level=`2` &parentRowTpl=`XonerateParentRowTpl`!]
                				</nav>
                


                XonerateParentRowTpl
                <li[+wf.classes+]>
                    <a href="[+wf.link+]" title="[+wf.title+]" class="parent">[+wf.linktext+]</a>
                    [+wf.wrapper+]
                </li>
                



                Please help, been at this for a few days and it's really starting to bug the crap out of me.

                A few notes as well and i'm not sure if the first one is right because as I said earlier, I duplicated this from another page.

                1.) The pages are uncached.
                2.) Modx Evolution 1.0.5
                3.) Wayfinder 2.0
                  • 22427
                  • 793 Posts
                  Can you show a bit of your CSS rules? Especially, what is the defnition for an a element of class parent?

                    • 35843
                    • 34 Posts
                    Hi ottogal.

                    good call on the css, I complete forgot to even add it. i know, noob mistake. lol.
                    One thing though, was that i'm trying make the first parent to also display content when clicked. it will display the submenu, but i want the link to display it's pertinent content as well.

                    Can this be done or am I just talking smack?

                    
                    /*Xonerate*/
                    #Xonerate{
                    }
                    
                    
                       #Xonerate #ProductMenu ul ul li{
                    	  font-size:12px;
                       }
                       
                       #Xonerate #ProductMenu ul ul li.last{
                       	border-bottom:0;
                       }
                    
                       #Xonerate #ProductMenu li.active li.last{
                       	border-bottom:0;
                       }
                    
                       #Xonerate #ProductMenu li.active{
                       	background-color:#F4F4F4;
                       }
                    
                       #Xonerate #ProductMenu li ul{
                       	display:none;
                       }
                    
                       #Xonerate #ProductMneu li ul li a{
                       	color:#888888;
                       }
                    
                       #Xonerate #ProductMenu li ul li.active a{
                    	  color:#003B7F;
                       }
                    
                       #Xonerate #ProductMenu li.active ul{
                    	  display:block;
                       }
                    
                       #Xonerate #ProductMenu li a.parent{
                    	  background:url(images/midas-arrow.png) no-repeat 4px 8px;
                       }
                    
                       #Xonerate #ProductMenu li a.open{
                    	  background:url(images/midas-arrow-down.png) no-repeat 4px 8px;
                       }
                       
                       #Xonerate #ProductMenu li li a{
                    	  background-image:none;
                       }