<nav class="top-bar"> <ul class="title-area"> <!-- Title Area --> <li class="name"></li> <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li> </ul> <section class="top-bar-section"> <ul class="left"> <!-- MENU ITEM #1 --> <li class="has-dropdown"><a href="#">About Us</a> <ul class="dropdown"> <li><a href="#">Dropdown Level 1b</a></li> <li><a href="#">Dropdown Level 1c</a></li> <li><a href="#">Dropdown Level 1d</a></li> <li><a href="#">Dropdown Level 1e</a></li> <li><a href="#">Dropdown Level 1f</a></li> </ul> </li> </ul> </section> </nav>
[[Wayfinder? &startId=`0` &level=`2` &rowTpl=`rowTpl` &outerTpl=`outerTpl` &parentRowTpl=`parentRow` &innerRowTpl=`innerRowTpl` &parentclass=`has-dropdown` &innerclass=`dropdown`]]
<!-- rowTpl --> <li class="has-dropdown"[[+wf.id]][[+wf.classes]]> <a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a> [[+wf.wrapper]] </li>
<!-- outerTpl --> <ul class="left"[[+wf.classes]]> [[+wf.wrapper]] </ul>
<!-- ParentRow --> <li> <a href="[[+wf.link]]">[[+wf.linktext]]</a> - [[+wf.description]] [[+wf.wrapper]] </li>
<!-- innerRowTpl --> <li><a href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>
You can hard code the title-area ul.[ed. note: scottmccullough last edited this post 10 years, 11 months ago.]
For the ul class="left", use parentClass=`has-dropdown` and innerClass=`dropdown`.
<!-- outerTpl --> <ul class="left"> <!-- rowTpl --> <li class="has-dropdown" class="first"> <a href="index.php?id=6" title="About Us" >About Us</a> </li> <!-- rowTpl --> <li class="has-dropdown" class="active"> <a href="index.php?id=9" title="Page 2" >Page 2</a> <!-- outerTpl --> <ul class="left"> <!-- innerRowTpl --> <li><a href="index.php?id=8">Why Farmland</a></li> <!-- innerRowTpl --> <li><a href="index.php?id=5">Investment Fundamentals</a></li> <!-- innerRowTpl --> <li><a href="index.php?id=4">The Problem</a></li> <!-- innerRowTpl --> <li><a href="index.php?id=15">The Opportunity</a></li> </ul> </li> <!-- rowTpl --> <li class="has-dropdown"> <a href="index.php?id=10" title="Page 3" >Page 3</a> </li> <!-- rowTpl --> <li class="has-dropdown"> <a href="index.php?id=11" title="Page 4" >Page 4</a> </li> -- rowTpl --> <li class="has-dropdown" class="last"> <a href="index.php?id=12" title="Page 5" >Page 5</a> <!-- outerTpl --> <ul class="left"> <!-- innerRowTpl --> <li><a href="index.php?id=7">721 Exchange</a></li> <!-- innerRowTpl --> <li><a href="index.php?id=3">Five Estate Planning Mistakes</a></li> </ul> </li> </ul>
You can hard code the title-area ul.
For the ul class="left", use parentClass=`has-dropdown` and innerClass=`dropdown`.
[[Wayfinder? &startId=`0` &level=`3` &outerTpl=`main_nav_outerTpl` &innerTpl=`main_nav_innerTpl` &outerClass=`top-bar` &innerClass=`dropdown` &parentClass=`has-dropdown` ]]
<ul id="topnav"[[+wf.classes]]> <ul class="title-area"> <!-- Title Area --> <li class="name"><h1><a href="#">[[*pagetitle]]</a></h1></li> <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone --> <li class="toggle-topbar menu-icon"> <a href="#"><span></span></a> </li> </ul> <section class="top-bar-section"> <ul class="left"> [[+wf.wrapper]] </ul> </section> </ul>
<ul[[+wf.classes]]> [[+wf.wrapper]] </ul>
So this works for me and I am adding it to the Flexibility 4 template http://flexibilitymodx.com/.
Wayfinder call
[[Wayfinder? &startId=`0` &level=`3` &outerTpl=`main_nav_outerTpl` &innerTpl=`main_nav_innerTpl` &outerClass=`top-bar` &innerClass=`dropdown` &parentClass=`has-dropdown` ]]
main_nav_outerTpl chunk
<ul id="topnav" [[+wf.classes]]=""> <ul class="title-area"> <!-- Title Area --> <li class="name"><h1><a href="#">[[*pagetitle]]</a></h1></li> <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone --> <li class="toggle-topbar menu-icon"> <a href="#"><span></span></a> </li> </ul> <section class="top-bar-section"> <ul class="left"> [[+wf.wrapper]] </ul> </section> </ul>
main_nav_innerTpl chunk
</ul[[+wf.classes]]><ul[[+wf.classes]]> [[+wf.wrapper]]