Change Autonav classes
Permalink
Hi,
I'm building a theme based on Bootstrap and I want to change the autonav ul class to
<ul class="nav navbar-nav navbar-right">
Please can someone point me in the right direction on how to do this?
thanks
Andy
I'm building a theme based on Bootstrap and I want to change the autonav ul class to
<ul class="nav navbar-nav navbar-right">
Please can someone point me in the right direction on how to do this?
thanks
Andy
Thanks, I'll give that a go at the weekend :)
Hi Nick,
i tried but it didn't see the new files.
Please can you tell me how to make C5 aware of it?
I edited the original file and it works great! Is there a way of getting into the theme directory?
Thanks
Andy
i tried but it didn't see the new files.
Please can you tell me how to make C5 aware of it?
I edited the original file and it works great! Is there a way of getting into the theme directory?
Thanks
Andy
Hi Andy,
You need to select the custom template while in edit mode for that autonav block.
If you called it bootstrap_nav.php then it will show up as Bootstrap Nav in the custom template drop down.
You need to select the custom template while in edit mode for that autonav block.
If you called it bootstrap_nav.php then it will show up as Bootstrap Nav in the custom template drop down.
Hi Nick, that works thanks :)
Hi,
Now i'm trying to add the bootstrap dropdown behaviour to the ul li
No joy though. Has anyone solved this? :)
Now i'm trying to add the bootstrap dropdown behaviour to the ul li
//*** Step 2 of 2: Output menu HTML ***/ echo '<ul class="nav navbar-nav">'; //opens the top-level menu foreach ($navItems as $ni) { echo '<li class="' . $ni->classes . '">'; //opens a nav item echo '<a href="' . $ni->url . '" target="' . $ni->target . '" class="' . $ni->classes . '">' . $ni->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>'; //closes the top-level menu
No joy though. Has anyone solved this? :)
You could call the file something other than view.php. Like my_autonav.php Then choose that custom template for the autonav block. It would show up as My Autonav in this case.
Hope that helps.
Nick