MyBB Community Forums

Full Version: Get nav links to be "active" when on that page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I can't seem to figure this out, I want to get the corresponding header link to be pressed in when I'm on that page. Here's a pic, you can see how I'm on the calender page but the home tab is shown as the active tab.
[spoiler]
[Image: mIGNB.png][/spoiler]

here's the code for my links in my header template
 <ul>
                                <li class="active"><a href="{$mybb->settings['bburl']}/index.php">Forums</a></li>                               
                                <li><a href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></li>
				<li><a href="{$mybb->settings['bburl']}/memberlist.php">{$lang->toplinks_memberlist}</a></li>
				<li><a href="{$mybb->settings['bburl']}/calendar.php">{$lang->toplinks_calendar}</a></li>
				<li><a href="{$mybb->settings['bburl']}/misc.php?action=help">{$lang->toplinks_help}</a></li>
			</ul>
template conditionals plugin would be the best way to do this i think.
Ok thanks, so after I get the plugin what do I do, what code do I use?
its all CSS and properly tagging the pages you want the colors to apply to and tagging the menu items.

http://hicksdesign.co.uk/journal/highlig...e-with-css
Just what I was looking for, thanks
(2012-08-23, 12:34 AM)pavemen Wrote: [ -> ]its all CSS and properly tagging the pages you want the colors to apply to and tagging the menu items.

http://hicksdesign.co.uk/journal/highlig...e-with-css

This is a really nice article, thanks.
(2012-08-23, 12:34 AM)pavemen Wrote: [ -> ]its all CSS and properly tagging the pages you want the colors to apply to and tagging the menu items.

http://hicksdesign.co.uk/journal/highlig...e-with-css

Sorry, one more question, how do I edit the body tag for each of the pages...home/calender/help/ etc
Follow this tutorial, which is the same but written specifically for MyBB: http://community.mybb.com/thread-113632.html