Welcome, Guest. Please login or register.
Did you miss your activation email?
February 11, 2012, 09:24:23 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149588 Posts in 21096 Topics by 7538 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Change active menu color when menu is developed using showmenu()  (Read 828 times)
msherifam01

Offline Offline

Posts: 4


« 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()?
Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2088



WWW
« Reply #1 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.
Logged

Professional WebsiteBaker Developer
msherifam01

Offline Offline

Posts: 4


« Reply #2 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.
Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2088



WWW
« Reply #3 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?
Logged

Professional WebsiteBaker Developer
msherifam01

Offline Offline

Posts: 4


« Reply #4 on: December 28, 2010, 10:38:10 AM »

<?php show_menu(1, 0, 1, true, '<li>[a][menu_title][/a]','</li>','<ul>', '</ul>', '', ''); ?>
Logged
Ruud
Board member
WebsiteBaker Org e.V.

Offline Offline

Posts: 2088



WWW
« Reply #5 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.
Logged

Professional WebsiteBaker Developer
msherifam01

Offline Offline

Posts: 4


« Reply #6 on: December 28, 2010, 12:26:19 PM »

yes.. its working... Thanx..
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!