Menu - I need to insert class="dropdown-toggle" data-toggle="dropdown" into href

Permalink
I need to instert it into the items that have dopdowms only.

Any help would be appreciated.


Thanks

View Replies:
Steevb replied on at Permalink Reply
Steevb
Which C5 version r u using?

What theme r u using?

What 'autonav' template r u using?

Need more info please.
tonyswaby replied on at Permalink Reply
v7 - simple bootstrap theme

this is the autonav view.php file;

echo '<nav class="main-nav navbar navbar-default">

<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse" style="margin-top:30px;">


<ul class="nav navbar-nav navbar-right">';

foreach ($navItems as $ni) {

echo '<li class="' . $ni->classes . '">'; //opens a nav item
$name = (isset($translate) && $translate == true) ? t($ni->name) : $ni->name;
echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="dropdown-toggle" data-toggle="dropdown">' . $name . '</a>';

if ($ni->hasSubmenu) {
echo '<ul class="dropdown-menu">'; //opens a dropdown sub-menu
} else {
echo '</li>'; //closes a nav item
echo str_repeat('</ul></li>', $ni->subDepth); //closes dropdown sub-menu(s) and their top-level nav item(s)
}
}

echo '</ul></div></nav>'; //closes the top-level menu


You can see I've tried inserting them on all href's but it disables the links.