WebsiteBaker Community Forum (upd)

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: msherifam01 on December 28, 2010, 07:30:41 AM

Title: Change active menu color when menu is developed using showmenu()
Post by: msherifam01 on December 28, 2010, 07:30:41 AM
Hi,

I am new to WB. I have created a website. I have a horizontal menu which is developed using showmenu() function. How can i highlight the active menu?

For eg:
i have 3 pages: Home, About Us and Contact Us
Wen the web page is opened the current menu will be home. When About us is clicked it will display the content of about us page but it should also highloght the about us menu tab also. How can i do it if am using showmenu()?
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: Ruud on December 28, 2010, 10:18:09 AM
If you look at the sourcecode of your generated pages you should find the the classes that are added for the current menu-item.
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: msherifam01 on December 28, 2010, 10:29:41 AM
It comes in the div topNav. Inside that <ul> and <li>. But in source code it does not state that which is active.
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: Ruud on December 28, 2010, 10:32:39 AM
Can you tell us what the showmenu() call looks like in your template?

Can we have a look at the website?
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: msherifam01 on December 28, 2010, 10:38:10 AM
<?php show_menu(1, 0, 1, true, '<li>[a][menu_title][/a]','</li>','<ul>', '</ul>', '', ''); ?>
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: Ruud on December 28, 2010, 11:02:02 AM
WebsiteBaker has a pretty good help area online:
http://www.websitebaker2.org/en/help/designer-guide/multiple-menus.php#anker3

On this page you can see all parameters for the "old" show_menu() function.
There it shows the 10th parameter will be the class for the current menu.
In your call this is forced to "" (nothing).

By simply removing the last 2 parameters from your functioncall it should show " class="menu_current"" in the current active menupage.
Title: Re: Change active menu color when menu is developed using showmenu()
Post by: msherifam01 on December 28, 2010, 12:26:19 PM
yes.. its working... Thanx..