I've been driving myself crazy trying to manipulate the output of my primary menu to be compatible with Twitter Bootstrap's drop-down menu and I'm wondering if anyone out there has done something similar or has the know-how to help me out and save me from losing further sleep on this. Just as example of Bootstraps menu I've got something that looks like this:
<ul class="nav">
<li class="active"><a href="/">Home</a></li>
<li class=""><a href="/news">News</a></li>
<li class=""><a href="/sports">Sports</a></li>
<li class=""><a href="/opinion">Opinion</a></li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Special Sections <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/special/welcome">Welcome</a></li>
<li><a href="/special/orientation">Orientation</a></li>
<li><a href="/special/housing">Housing</a></li>
</ul>
</li>
<li class="dropdown">
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Media <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="/media/video">Video</a></li>
<li><a href="/media/photo">Photo</a></li>
</ul>
</li>
</ul>
I've tried using the theme hook:
<?php
print theme('links', $primary_links, array('id' => 'nav', 'class' => 'nav links primary-links'));
?>
Along with phptemplate_menu_item
and phptemplate_menu_item_link
functions in template.php, but so far I've only been able to successfully duplicate the top level of the menu.
As a reference: Drupal Override Custom Menu Template
Thanks in advance!