<![CDATA[ Wayfinder with Bootstrap - My Forums]]> https://forums.modx.com/thread/?thread=87803 <![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-550066 Quote from: ezersky at Sep 10, 2015, 02:10 PM
Bootstrap 3 navbar menu

[[Wayfinder?                   
  &startId=`0`
  &level=`2`
	&outerClass=`nav navbar-nav`
	&innerClass=`dropdown-menu`
	 &hereClass=`active`
	&rowTpl=`menuNavbarRow`
	&innerRowTpl=`menuNavbarSubmenu`
]]


Chunk menuNavbarRow

<li class="[[+wf.classnames]][[+wf.isfolder:is=`1`:then=` dropdown`]]">
	<a href="[[+wf.isfolder:is=`1`:then=`#`:else=`[[+wf.link]]`]]" title="[[+wf.title]]" [[+wf.isfolder:is="`1`:then=`class="dropdown-toggle"" data-toggle="dropdown" `]]="" [[+wf.attributes]]="">[[+wf.linktext]] [[+wf.isfolder:is=`1`:then=`<b class="caret"></b>`]]
    </a>
	[[+wf.wrapper]]
</li>


Chunk menuNavbarSubmenu

<li class="dropdown-submenu"><a href="[[+wf.link]]" [[+wf.attributes]]="">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>

Thanks for this @ezersky, worked perfectly!]]>
mick2470 Apr 12, 2017, 02:55 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-550066
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-537673 Quote from: ezersky at Sep 10, 2015, 07:10 PM
Bootstrap 3 navbar menu

[[Wayfinder?                   
  &startId=`0`
  &level=`2`
	&outerClass=`nav navbar-nav`
	&innerClass=`dropdown-menu`
	 &hereClass=`active`
	&rowTpl=`menuNavbarRow`
	&innerRowTpl=`menuNavbarSubmenu`
]]


Chunk menuNavbarRow

<li class="[[+wf.classnames]][[+wf.isfolder:is=`1`:then=` dropdown`]]">
	<a href="[[+wf.isfolder:is=`1`:then=`#`:else=`[[+wf.link]]`]]" title="[[+wf.title]]" [[+wf.isfolder:is="`1`:then=`class="dropdown-toggle"" data-toggle="dropdown" `]]="" [[+wf.attributes]]="">[[+wf.linktext]] [[+wf.isfolder:is=`1`:then=`<b class="caret"></b>`]]
    </a>
	[[+wf.wrapper]]
</li>


Chunk menuNavbarSubmenu

<li class="dropdown-submenu"><a href="[[+wf.link]]" [[+wf.attributes]]="">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>

Hi, this solution works best so far, with the other solutions on previous pages Wayfinder wasn't picking up CSS for some reason.
But I still have some issues if I could get help from someone? The dropdown doesn't work, I suspect it's because there is no sub-menu items linked - I've created weblinks in the document tree because the submenu items are to link to an external site, how do I add them?

And two, the menu in mobile is constantly showing, it's not hiding like it should.

Any help would be greatly appreciated.
Thanks all for your awesome help!]]>
breno785au Jan 30, 2016, 04:23 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-537673
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-534790 mleipoldhaas Nov 25, 2015, 07:09 AM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-534790 <![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-531334 Bootstrap 3 navbar menu

[[Wayfinder?                   
  &startId=`0`
  &level=`2`
	&outerClass=`nav navbar-nav`
	&innerClass=`dropdown-menu`
	 &hereClass=`active`
	&rowTpl=`menuNavbarRow`
	&innerRowTpl=`menuNavbarSubmenu`
]]


Chunk menuNavbarRow

<li class="[[+wf.classnames]][[+wf.isfolder:is=`1`:then=` dropdown`]]">
	<a href="[[+wf.isfolder:is=`1`:then=`#`:else=`[[+wf.link]]`]]"
    	title="[[+wf.title]]" [[+wf.isfolder:is=`1`:then=`class="dropdown-toggle" data-toggle="dropdown"`]] 
    	[[+wf.attributes]]>[[+wf.linktext]] [[+wf.isfolder:is=`1`:then=`<b class="caret"></b>`]]
    </a>
	[[+wf.wrapper]]
</li>


Chunk menuNavbarSubmenu

<li class="dropdown-submenu"><a href="[[+wf.link]]" [[+wf.attributes]]>[[+wf.linktext]]</a>[[+wf.wrapper]]</li>
]]>
ezersky Sep 10, 2015, 02:10 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-531334
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-501043 Quote from: phijui at Dec 08, 2013, 04:24 AM
You can do it with one wayfinder call. Lighter than the previous solution in the resource cache

Wayfinder call:

[[Wayfinder? &startId=`0` &level=`2` &outerTpl=`NavbarOuter` &rowTpl=`NavbarRow` &activeParentRowTpl=`NavbarActiveParentRow` &parentRowTpl=`NavbarParentRow` &innerTpl=`NavbarInner` &innerRowTpl=`NavbarInnerRow` &firstClass=`` &lastClass=`` &removeNewLines=`1`]]


NavbarOuter:

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


NavbarRow:

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


NavbarParentRow:

<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#" title="[[+wf.title]]">[[+wf.linktext]] <b class="caret"></b></a>[[+wf.wrapper]]</li>


NavbarActiveParentRow:

<li class="dropdown active"><a class="dropdown-toggle" data-toggle="dropdown" href="#" title="[[+wf.title]]">[[+wf.linktext]] <b class="caret"></b></a>[[+wf.wrapper]]</li>


NavbarInner:

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


NavbarInnerRow:

<li class="divider"></li>
<li[[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a>


With a custom css rule:

.dropdown-menu li.divider:first-child {
  display: none;
}




</li[[+wf.classes]]></li[[+wf.classes]]>

I tried this, but can't seem to get it to work. I'm using MODX Revolution 2.2.14-pl (traditional). I have copied and pasted the above way finder call and it's chunks 3 times to double check that I have the same thing.

Here is the html that it is outputting along with some comments I put in to show what is missing:
<nav class="collapse navbar-collapse bs-navbar-collapse pull-right"role="navigation">  
	<ul class="nav navbar-nav">
		<li><!-- missing class="dropdown"-->
			<a href="index.php?id=3" title="Insurance">Insurance</a>
			<!-- missing href="#" class="dropdown-toggle" data-toggle="dropdown"-->

			<ul class="dropdown-menu">
				<li class="divider"></li>
				<!-- href="#" class="dropdown-toggle" data-toggle="dropdown"-->
				<li><a href="index.php?id=2">Auto</a></li><li class="divider"></li>
				<li><a href="index.php?id=5">Auto2</a></li>
			</ul>
		</li>

		<li>
			<a href="index.php?id=4" title="Compare Rates">Compare Rates</a>
		</li>
	</ul>
</nav>


I'm really stuck on this and don't know what to do.]]>
aaron4osu Jun 20, 2014, 10:30 AM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-501043
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-494753 Quote from: rx2 at Nov 19, 2013, 10:46 PM
My Wayfinder call:

[[Wayfinder?
    &startId=`0`
    &level=`0`
    &outerTpl=`mmouterTPL`
    &rowTpl=`mmrowTPL`
    &rowClass=dropdown 
    &hereClass=active
]]



The mmrowTPL (you have to have the Switch Extra installed):

[[!switch?
    &get=`[[+isfolder]]`
    &c1=`0` &do1=`<li[[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a>`
    &c2=`1` &do2=`<li class="dropdown">
    <a class="dropdown-toggle" data-toggle="dropdown" href="#">[[+wf.linktext]] <b class="caret"></b></a>
    [[Wayfinder?&startId=`[[+wf.docid]]`&outerTpl=`mminnerTPL`&rowTpl=`mminnerrowTPL`]]
    </li>`
    &default=`<li[[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a>`
]]


My little fix for mmrowTPL
<li [[+wf.classes]]>
    <a class="dropdown-toggle" [[!switch? &get=`[[+isfolder]]` &c1=`1` &do1=`data-toggle="dropdown"` &default=``]] href="[[+wf.link]]" [[+wf.attributes]]>[[+wf.linktext]]  
     [[!switch? &get=`[[+hasChildren]]` &c1=`1` &do1=`<b class="caret"></b>` &default=``]] 
    </a>
    [[Wayfinder?&startId=`[[+wf.docid]]`&outerTpl=`mminnerTPL`&rowTpl=`mminnerrowTPL`]]
</li>


this makes being a container does not have the ability to click (title), on the contrary and having children can follow a link.

Regards!]]> erloko Apr 11, 2014, 04:15 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-494753 <![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-489809 eladnova Feb 12, 2014, 02:51 AM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-489809 <![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-489748
.dropdown:hover>ul{display:block}


That will show all uls that are a child of any li with the class dropdown and display it on hover.

Hope that helps, good luck.]]>
benmarte Feb 11, 2014, 02:29 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap?page=2#dis-post-489748
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap#dis-post-489733 Quote from: phijui at Dec 08, 2013, 04:24 AM
You can do it with one wayfinder call. Lighter than the previous solution in the resource cache


Hi phijui

Thanks for sharing that. Works beautifully for me.
Did you come across any guidelines for triggering the drop down on MouseOver instead of on click?]]>
eladnova Feb 11, 2014, 10:43 AM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap#dis-post-489733
<![CDATA[Re: Wayfinder with Bootstrap]]> https://forums.modx.com/thread/87803/wayfinder-with-bootstrap#dis-post-489212 I have a slightly more complicated menu for a site I'm working on.

I've followed rx2 code and got the basics working, however I need help to expand this a little further if possible.

Attached is a screenshot for you to quickly see what I'm after. I have the html coded below ready to setup in Modx.

So the basics I have working. Now I need to expand on the code that pulls in the drop down menu to look at the site tree and bring back second level (Advice,Investment,Services) as titles, then display the sections within each second level.

Please can anyone help me to get this working please, and point me in the right direction. I'm sure I need to expand/ code more inside mminnerTPL to pull in the extra html to handle but not sure how to.

Thank you guys!


Financial Management
Advice
- Thinking about investment
- Seeking advice
- Thinking about retirement

Investment
- Investment Advice
- Wealth Management
- Rebalancing/ Fund Switch

Services
- Our service agreement
- Trustees
- Fee Agreement


Investment Management
Investment
- Thinking about investment
- Seeking advice
- Thinking about retirement

Portfolios
- Portfolio 1
- Portfolio 2
- Portfolios 3

Services
- Our service agreement
- Trustees
- Fee Agreement

etc...

<nav class="navbar navbar-default hidden-xs" role="navigation">
  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav"> 
		<li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Financial Advice</a>
              <div class="dropdown-menu multi-column">
                <div class="row">
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Advice</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Seeking Independent Advice</a></li>
                        </ul>
                    </div>
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Investment</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Investment Advice</a></li>
                        </ul>
                    </div>
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Services</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Our Service Agreement</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Qualifying Workplace Pensions</a>
              <div class="dropdown-menu multi-column">
                <div class="row">
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Advice</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Seeking Independent Advice</a></li>
                        </ul>
                    </div>
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Investment</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Investment Advice</a></li>
                        </ul>
                    </div>
                    <div class="col-sm-4 col-md-4">
                    	<span class="subnavheading">Services</span>
                        <ul class="dropdown-menu">
                            <li><a href="#">Our Service Agreement</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </li>
    </ul>
  </div><!-- /.navbar-collapse -->
]]>
zooba Feb 05, 2014, 12:25 PM https://forums.modx.com/thread/87803/wayfinder-with-bootstrap#dis-post-489212