Forums / Templates, Stylesheets, Page Layout / Coding issue with top nav bar

Coding issue with top nav bar

Locked
Results 1 to 5 of 5
This thread is locked. New replies are disabled.
24 Apr 2009, 17:44
#1
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Coding issue with top nav bar

Hi everyone i have discovered how to can add and edit pages in the top nav bar header. however i cannot set it up with EZ-Pages or Products.

an example of the code i use to set-up a button is

<?php
if ($current_page_base ==privacy '') { $active = 'tab_active'; 
	} else { $active = '';
}?>
		<li id="<?php echo $active;?>"><a href="index.php?main_page=privacy"><?php echo TOP_MENU_PRIVACY;?></a></li>


Which is fine for most pages, but not EZ-Pages the code

if ($current_page_base
will not work for EZ-pages or product anyone know the code the i should be using for those pages? thanks in advance :smile:

the site is http://www.testvip.myfreeola.com
25 Apr 2009, 03:49
#2
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Re: Coding issue with top nav bar

Please help :( im so close any advice would be great thanks:smile:
25 Apr 2009, 16:07
#3
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Re: Coding issue with top nav bar

Sorry for double posting but it would not let me edit.

i should be more clear. when a link is selected on the top navigation bar, the button appears as if it "pressed in" which can be seen with the new products button. however with EZ-Pages the "if active code" (above) does not show the button pressed in. which is what i am having problems with, sorry about the confusion. :blink:
25 Apr 2009, 17:01
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Posts:
7,017
Plugin Contributions:
12

Re: Coding issue with top nav bar

TheBuz:

Sorry for double posting but it would not let me edit.

i should be more clear. when a link is selected on the top navigation bar, the button appears as if it "pressed in" which can be seen with the new products button. however with EZ-Pages the "if active code" (above) does not show the button pressed in. which is what i am having problems with, sorry about the confusion. :blink:


Try using this code: (the 2,5 are the ezpage id)

if (in_array($ezpage_id,explode(",",'2,5'))) {

$active = 'tab_active';

}
25 Apr 2009, 17:39
#5
thebuz avatar

thebuz

Zen Follower

Join Date:
Apr 2009
Posts:
84
Plugin Contributions:
0

Re: Coding issue with top nav bar

hi thanks, but 10 minutes i discovered how to add new define pages, :frusty: so iv'e decided to go that way with it, thanks for your input though :D