We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47666
    • 43 Posts
    I'm having problems getting my bootstrap navbar to work with way finder with MODX Revolution 2.2.14-pl (traditional)

    here is the static working navbar I'm trying to create in wayfinder:
    <nav class="collapse navbar-collapse bs-navbar-collapse pull-right" role="navigation">
      <ul class="nav navbar-nav">
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown">Insurance<b class="caret"></b></a>
          <ul class="dropdown-menu">
            <li><a href="boat.html">Boat Insurance</a></li>
            <li><a href="car.html">Car Insurance</a></li>
            <li><a href="home.html">Home Insurance</a></li>
          </ul>
        </li>
        <li>
          <a href="quote.html">Free Quote</a>
        </li>
        
        <li>
          <a href="agent.html">Find An Agent</a>
        </li>
    
        <li class="call-now">
          <a href="#" >Call Now | 888-555-5555</a>
        </li>
      </ul>
    </nav>
    


    here is my wayfinder call:
    [[!Wayfinder?
      &startId=`0`
      &outerTpl=`Wayfinder.outerTpl`
      &rowTpl=`Wayfinder.rowTpl`
      &innerTpl=`Wayfinder.innerTpl`
      &innerRowTpl=`Wayfinder.parentRowTpl`
      &hereClass=`current_page_item`
      &firstClass=``
      &lastClass =`` ]]
    


    these are the default bootstrap wayfinder chunks:

    Wayfinder.outerTpl:
    <ul class="nav navbar-nav">
    	[[+wf.wrapper]]
    </ul>
    


    Wayfinder.rowTpl:
    <li [[+wf.classes]]>
    	<a href="[[+wf.link]]" [[+wf.attributes]]>[[+wf.linktext]]</a>
    	[[+wf.wrapper]]
    </li>
    


    Wayfinder.innerTpl:
    <ul class="dropdown-menu">
    	[[+wf.wrapper]]
    </ul>
    


    Wayfinder.parentRowTpl:
    <li class="[[+wf.classnames]] dropdown">
    	<a href="[[If? &subject=`[[++bootstrap.dropdown_disabled]]` &operand=`1` &then=`[[+wf.link]]` &else=`#`]]" title="[[+wf.title]]" class="dropdown-toggle [[If? &subject=`[[++bootstrap.dropdown_disabled]]` &operand=`1` &then=`disabled`]]" data-toggle="dropdown" [[+wf.attributes]]>
    		[[+wf.linktext]] 
    		<b class="caret"></b>
    	</a>
    	[[+wf.wrapper]]
    </li>
    



    here is the live demo:
    http://aaronhaas.com/bsi/

    here is the code that is currently being output along with some comments on what needs to change:
    <!-- Wayfinder.outerTpl -->
    <ul class="nav navbar-nav">
    	
    	<!-- Wayfinder.rowTpl -->
    	<li class="current_page_item">
    		<a href="http://aaronhaas.com/bsi/">Home</a>	
    	</li>
    	<!-- end Wayfinder.rowTpl -->
    
    	<!-- Wayfinder.rowTpl  needs class="dropdown" -->
    	<li>
    		<!-- needs class="dropdown-toggle" data-toggle="dropdown" -->
    		<!-- also I don't want this to be a link but rather a category-->
    		<a href="index.php?id=3">Insurance</a>
    		
    		<!-- Wayfinder.innerTpl -->
    		<ul class="dropdown-menu">
    		
    			<!-- Wayfinder.parentRowTpl -->
    			<li class=" dropdown">
    				<a href="index.php?id=5" title="Home Insurance" class="dropdown-toggle disabled" data-toggle="dropdown">
    					Home Insurance 
    					<b class="caret"></b>
    				</a>
    			</li>
    			<!-- end Wayfinder.parentRowTpl -->
    
    			<!-- Wayfinder.parentRowTpl -->
    			<li class=" dropdown">
    				<a href="index.php?id=6" title="Boat Insurance" class="dropdown-toggle disabled" data-toggle="dropdown">
    					Boat Insurance 
    					<b class="caret"></b>
    				</a>	
    			</li>
    			<!-- end Wayfinder.parentRowTpl -->
    			
    			<!-- Wayfinder.parentRowTpl -->
    			<li class=" dropdown">
    				<a href="index.php?id=4" title="Motorcycle Insurance" class="dropdown-toggle disabled" data-toggle="dropdown">
    					Motorcycle Insurance 
    					<b class="caret"></b>
    				</a>
    				
    			</li>
    			<!-- end Wayfinder.parentRowTpl -->
    
    		</ul>
    		<!-- end Wayfinder.innerTpl -->
    	</li>
    	<!-- end Wayfinder.rowTpl -->
    
    	<!-- Wayfinder.rowTpl -->
    	<li>
    		<a href="index.php?id=7">Home</a>	
    	</li>
    	<!-- end Wayfinder.rowTpl -->
    
    </ul>
    



    Any ideas on what I'm doing wrong. Any help will be greatly appreciated smiley [ed. note: aaron4osu last edited this post 9 years, 11 months ago.]
      • 47666
      • 43 Posts
      It's been couple of weeks with no suggestions. Can someone please take a look and let me know what I'm doing wrong. Also Is it possible to add a third level of nested menus?
        • 24603
        • 7 Posts
        I have this same problem. Has anyone gotten this to work?
          • 20413
          • 2,877 Posts
          I just noticed this for a site where MODX is installed under a subdomain.
          It won't read the tpl chunks and fall back to default.

          Set debug=`1` and track down the config file until this has been resolved!
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 20413
            • 2,877 Posts
            Nope... I hade spelled the chunk names wrong! tongue It's working!
              @hawproductions | http://mrhaw.com/

              Infograph: MODX Advanced Install in 7 steps:
              http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

              Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
              http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower