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
[ed. note: aaron4osu last edited this post 10 years, 8 months ago.]