Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Posts
    17
    Plugin Contributions
    0

    Default highlight current link

    is possible insert a code that assign a style at the menu in the header bar (bar of epages, privacy notice, etc.) and also in box (information, more Information) page when the link is activate?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: highlight current link

    I suppose you'd like to know how...

    In general terms, you could put a test in each link display code (say Privacy notice) to check for $main_page == 'privacy' or whatever, and if true, set a class="activePage" for it.
    Then style .activePage {} in your stylesheet to have whatever distinction you want.

  4. #4
    Join Date
    Nov 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: highlight current link

    Hi gjh42,

    this is my first question on this forum (I found out every other infos searching with patience...).
    Could you explain me how files I have to change and send an example of php code? For CSS I have no problems.
    Thanks in advance!

    talos

  5. #5
    Join Date
    Nov 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: highlight current link

    tried to resolve myself the problem...

    1) styled .active {} class in my stylesheet;

    2) created php code

    <?php if($main_page == 'login') print ' class="active"'; ?>

    for testing and printing;

    Now. I tried to put it in tpl_ezpages_bar_header.php and tpl_header.php, but happens nothig.

    Someone want to help me complete the work?

    talos

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: highlight current link

    The ez-pages bar is going to be difficult, because it is built completely dynamically. There is no fixed code to insert an appropriate class tag into.

    The file where the class would have to be added is /includes/modules/ezpages_bar_header.php. I know the information is available to that file, but it will have to be extracted from a field of an array variable (?$page_query_list_header[$rows]['altURL']?), then probably massaged and compared against the current page so the
    class="active"
    text can be added to $page_query_list_header[$rows]['link'].

 

 

Similar Threads

  1. Flyout Menu highlight current category
    By scott_ease in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 28 Jul 2012, 06:06 PM
  2. Highlight Current Link
    By uncharted in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 22 Jan 2012, 04:05 AM
  3. regaining highlight of current ezpage
    By dayaki in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 May 2011, 12:06 PM
  4. Highlight current moreinformation & information sidebox links
    By PhilipB in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Mar 2011, 01:13 PM
  5. Highlight the Current Page with CSS
    By FoodDudes in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 28 Feb 2010, 01:13 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR