Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Change Appearance of Selected All & New Products Link

    When I click on a "normal" category link in my categories sidebox, the link itself becomes bold font (and the page loads). When I click the "all products" and "new products" links in the categories sidebox, the page loads, but the font does not change in the sidebox link.

    How can I also make the font bold when I click the "all products" and "new products" in the categories sidebox?

    There doesn't seem to be a simple solution. I have searched my stylesheet and this forum. The normal links use:

    class="category-subs-selected"

    to designate it's been selected, and CSS takes over from there...
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

  2. #2
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Change Appearance of Selected All & New Products Link

    Dm,
    Post me a link to your site please....
    Mark
    Hare Do

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: Change Appearance of Selected All & New Products Link

    Quote Originally Posted by dmfelder View Post
    When I click on a "normal" category link in my categories sidebox, the link itself becomes bold font (and the page loads). When I click the "all products" and "new products" links in the categories sidebox, the page loads, but the font does not change in the sidebox link.

    How can I also make the font bold when I click the "all products" and "new products" in the categories sidebox?

    There doesn't seem to be a simple solution. I have searched my stylesheet and this forum. The normal links use:

    class="category-subs-selected"

    to designate it's been selected, and CSS takes over from there...
    Dm,
    add this to your_template/ stylesheet.css

    A.category-links:hover {font-weight: bold;}
    Mark
    Hare Do

  4. #4
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: Change Appearance of Selected All & New Products Link

    Thanks, Haredo.

    Unfortunately, that's just a mouse-over event before the page loads. I would like the words "All Products..." to be highlighted on the page when that specific page is loaded.

    You'll see what I mean here:

    sickbrands.com/sickcart

    When you click on any normal category, the page loads and the respective category link in the sidebox is highlighted (bold & yellow). It works for everything but All Products and New Products.

    Unlike the normal categories, there doesn't seem to be a "selected" <SPAN> field for me to identify in CSS. This seems weird to me, because I would imagine almost everyone would want these links to perform the same as the category links.
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

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

    Default Re: Change Appearance of Selected All & New Products Link

    You will need to add a test for current page to affect the span output.
    For example, to highlight the "All Products..." link, find this in
    /includes/templates/your_template/sideboxes/tpl_categories.php:
    PHP Code:
        if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
          
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_ALL) . '">' CATEGORIES_BOX_HEADING_PRODUCTS_ALL '</a>' "\n";
        } 
    Add

    <span' . (($current_page_base == 'products_all')? ' class="category_links_selected"': '') . '>'

    and

    </span>

    to get
    PHP Code:
        if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
          
    $content .= '<a class="category-links" href="' zen_href_link(FILENAME_PRODUCTS_ALL) . '"><span' . (($current_page_base == 'products_all')? ' class="category_links_selected"''') . '>' CATEGORIES_BOX_HEADING_PRODUCTS_ALL '</span></a>' "\n";
        } 
    The other links will need similar treatment.

  6. #6
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: Change Appearance of Selected All & New Products Link

    YOU are awesome, thanks! I think you left out a <li> element, but that's a great and simple solution!

    For anyone else interested, here is the updated code:

    Code:
     
    if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') {
    $content .= '<li><a class="category-links" href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '"><span' . (($current_page_base == 'products_all')? ' class="category_links_selected"': '') . '>' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</span></a></li>' . "\n";
    }

    Then make a simple addtion to your CSS stylesheet for category_links_selected.

    Piece of cake!

    Thanks again!
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

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

    Default Re: Change Appearance of Selected All & New Products Link

    The standard Zen Cart categories sidebox does not have <li> elements, just <a> links separated by <br /> to keep them in a column.
    Some templates and mods have reworked the categories into a list, which makes more sense.

 

 

Similar Threads

  1. Disabling New Products & Enabling All Products in Category List
    By JRayfield in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 31 Jan 2010, 04:49 PM
  2. Change to Gallery view for New / Featured / All products link?
    By alimtlai in forum Basic Configuration
    Replies: 5
    Last Post: 31 Aug 2009, 05:07 PM
  3. Product Images & Description MISSING in the NEW PRODUCTS & ALL PRODUCTS LISTING pages
    By TJB in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 30 Apr 2008, 03:36 PM
  4. All Products & New Products Page Styles
    By sonicparke in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Aug 2006, 03:43 PM

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