It looks like you're new here. If you want to get involved, click one of these buttons!
<ul class="nav">
<li class="active first"><a href="#">Parent #1</a></li>
<li><a href="#">Parent #2</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Parent #3
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="#">Child #3.1</a></li>
<li><a href="">Child #3.2</a></li>
<li><a href="">Child #3.3</a></li>
<li><a href="">Child #3.4</a></li>
<li><a href="">Child #3.6</a></li>
</ul>
</li>
</ul>
Comments
.dropdown-menu, .nav ul { put the .dropdown-menu CSS code here }
Does that make sense?
I modified your Menu.php class which actually generates the Bootstrap v2 compatible navigation on the fly. Here is the modified version of code. Hope this helps if someone is looking for the same solution:
https://gist.github.com/anunay/8180600
Thank you
Anunay
Does this menu.php work with bootstrap 3? I tried to add your menu class but did not have any success.
Thanks,
Could you give me an example of how I would apply this?
Thanks,
<?php echo fuel_nav(array('subcontainer_tag_class' => array(0 => 'dropdown-menu')));?>
Parse error: syntax error, unexpected ';' in /Applications/MAMP/htdocs/wycf/fuel/application/views/_blocks/header.php
<?php echo fuel_nav(array('subcontainer_tag_class' => array(1 => 'navbar')));?>
add "navbar" class to second set of "ui" tags?
<?php echo fuel_nav(array('subcontainer_tag_class' => array(0 => 'navbar')));?>
Does not have any affect on my navigation.<nav class="nav nav-pills nav-justified" role="navigation"> <?php echo fuel_nav(array('subcontainer_tag_class' => array(1 => 'nav navbar-nav')));?> </nav>
Which file was changed to add the subcontainer_tag_class ? Perhaps I check that particular file is the latest version.
The fuel/modules/fuel/libraries/Menu.php class and the fuel/modules/fuel/libraries/Fuel_navigation.php class are the ones that changed but if you updated to 1.2, you should be OK.
<?php $nav['work'] = 'What We Wo'; $nav['people'] = 'Get Involved'; $nav['donate'] = 'Donate'; //People Sublcass $nav['people/volunteer'] = array('label' => 'Volunteer', 'parent_id' => 'people'); $nav['people/advisors'] = array('label' => 'Advisors', 'parent_id' => 'people');
<body> <nav class="nav nav-pills nav-justified" role="navigation"> <?php echo fuel_nav(array('container_tag_class' => array(0 => 'navbar')));?> <?php echo fuel_nav(array('subcontainer_tag_class' => array(1 => 'dropdown-menu')));?> </nav>
<nav class="nav nav-pills nav-justified" role="navigation"> <ul> <li class="first"><a href="http://wycf:8888/work">What We Wo</a></li> <li><a href="http://wycf:8888/people">Get Involved</a> <ul class="nav navbar-nav"> <li class="first"><a href="http://wycf:8888/people/volunteer">Volunteer</a></li> <li class="last"><a href="http://wycf:8888/people/advisors">Advisors</a></li> </ul> </li> <li class="last"><a href="http://wycf:8888/donate">Donate</a></li> </ul> </nav>
<nav> <ul class="nav nav-tabs" role="tablist"> <li class="first active"><a href="http://wycf:8888/work">What We Wo</a></li> <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="http://wycf:8888/people">Get Involved</a> <ul class="dropdown-menu" role="menu"> <li class="first"><a href="http://wycf:8888/people/volunteer">Volunteer</a></li> <li class="last"><a href="http://wycf:8888/people/advisors">Advisors</a></li> </ul> <li class="last"><a href="http://wycf:8888/donate">Donate</a></li> </ul> </nav>