Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    102
    Plugin Contributions
    0

    Default 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

    Code:
    <?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

    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

    the site is http://www.testvip.myfreeola.com

  2. #2
    Join Date
    Apr 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Coding issue with top nav bar

    Please help im so close any advice would be great thanks

  3. #3
    Join Date
    Apr 2009
    Posts
    102
    Plugin Contributions
    0

    Default 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.

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: Coding issue with top nav bar

    Quote Originally Posted by TheBuz View Post
    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.
    Try using this code: (the 2,5 are the ezpage id)

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

    $active = 'tab_active';

    }

  5. #5
    Join Date
    Apr 2009
    Posts
    102
    Plugin Contributions
    0

    Default Re: Coding issue with top nav bar

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

 

 

Similar Threads

  1. PHP coding.
    By Xam in forum General Questions
    Replies: 5
    Last Post: 10 Apr 2008, 09:47 AM
  2. I need coding help BAD...... :(
    By g0d4lm1ty in forum General Questions
    Replies: 3
    Last Post: 22 Sep 2006, 07:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •