Results 1 to 9 of 9
  1. #1
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default How to keep current tab/button active?

    Hi there,

    I have a navigation menu and I would like to keep the the selected tab/button active when a visitor is viewing that category or products within that category. At this moment, I have managed to get the tab/button active when viewing the category but once a product is clicked, the tab/button no longer become active. What im trying to achieve is the same as how the "play dot com" navigation menu works. Any help please.

    And merry xmas!!!

    All the best

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

    Default Re: How to keep current tab/button active?

    If you are using the built-in Zen Cart categories navigation, there are classes that can be styled to distinguish the current category path even when a product info page is open. We can advise what to do if we can see your site live.

  3. #3
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default Re: How to keep current tab/button active?

    Sent you a pm with the link to the domain. Domain is still under construction.

    Thanks

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

    Default Re: How to keep current tab/button active?

    I can look at it in detail when I get home tomorrow.

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

    Default Re: How to keep current tab/button active?

    Have you figured it out since you posted? Your categories-tabs navigation corectly shows the active top category, even when in an individual product page (as it should be able to do by default).

    If you are looking to have the sidebox "Departments" menu do this, it will not be possible in your current configuration, as you have used Categories Dressing headings to mimic a complete second-level subcategory menu without actually using any real categories. If you want those to show the active category, you will need to reconfigure it to use the ch_categories option, and set the define to show only the second-level subcategories.


    It appears that the "departments" are a mix of various levels, with some categories not represented at all. You are not going to be able to have this highlighted without new custom coding, or possibly some very fancy styling applied to ch_categories.
    Last edited by gjh42; 28 Dec 2010 at 07:46 PM.

  6. #6
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default Re: How to keep current tab/button active?

    Hello,

    Yeah, managed to figured it out myself. Copied the script from the tpl_main_page.php and just edited it according to the category id.
    As for the "departments" menu, it will probably stay as it is as the active tab on the top menu will be enough to tell visitors where they are on the site. This menu is also not done yet so some of the categories are not represented, they are just a list of what categories im planning on having.

    Thanks for taking the time to have a look.

    All the best

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

    Default Re: How to keep current tab/button active?

    Huh... looks like you reinvented the wheel by creating custom categories and other links menus for the header. Did you know that you could have just applied a bit of styling in the stylesheet (and possibly moved those sections of code a bit in the standard tpl_header.php) to result in the identical functions as what you built?

  8. #8
    Join Date
    May 2006
    Posts
    725
    Plugin Contributions
    0

    Default Re: How to keep current tab/button active?

    Didnt know that. But would I be using the built in categories tab to do that?

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

    Default Re: How to keep current tab/button active?

    Yes, you could use the categories-tabs menu and ez-pages header menu for the left and right nav respectively; styling them could make the appearance of one nav bar as you have now.

    The Ezpages Improved Menus mod just submitted to Free Addons will allow highlighting the current page link. Look in the support thread for now if you want to use it.

 

 

Similar Threads

  1. Active links based on current catagory
    By DannyVarley in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Feb 2013, 02:11 PM
  2. Turning on the Buy Now button on Product Listing when attributes are active
    By PearceStephens in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 14 Dec 2012, 12:31 AM
  3. active cart button shows red
    By rayleighstamps in forum Managing Customers and Orders
    Replies: 0
    Last Post: 14 Nov 2008, 12:19 PM
  4. css button and a:active in IE7
    By chabates in forum General Questions
    Replies: 2
    Last Post: 9 Jun 2008, 02:03 AM
  5. Preview button not active when trying to add image.
    By 5Jays217 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 17 Jun 2006, 05:35 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