Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    104
    Plugin Contributions
    0

    Default category-specific css

    I am trying to do this in my override tpl.categories.php:

    // to make a specific category stand out define a new class in the stylesheet example: A.category-holiday
    // uncomment the select below and set the cPath=3 to the cPath= your_categories_id
    // many variations of this can be done
    // case ($box_categories_array[$i]['path'] == 'cPath=3'):
    // $new_style = 'category-holiday';
    // break;

    but I am not doing it right, could someone please walk me throught it:

    I created a class in the stylesheet:
    a.category-accessories {font-weight=bold;}

    for the category accessories.

    I changed the above to;

    case ($box_categories_array[$i]['path'] == 'cPath= accessories'):
    $new_style = 'category-accessories';
    break;

    but it doesn't work. What am I doing wrong?

  2. #2
    Join Date
    Feb 2007
    Posts
    104
    Plugin Contributions
    0

    Default Re: category-specific css

    Okay, I feel kind of dumb, because the category id is "1" not "accessories", so I changed it to:

    case ($box_categories_array[$i]['path'] == 'cPath=1'):
    $new_style = 'category-accessories';
    break;

    and now it works!

 

 

Similar Threads

  1. Replies: 4
    Last Post: 23 Feb 2014, 09:39 PM
  2. category specific css for different browsers
    By eVelt in forum Templates, Stylesheets, Page Layout
    Replies: 31
    Last Post: 18 Jul 2010, 09:51 PM
  3. specific banner to show for specific category
    By vijay in forum Basic Configuration
    Replies: 1
    Last Post: 26 Aug 2009, 01:19 PM
  4. Show Specific Category on Index Listing or Add Entire Category to Featured Products.
    By devnut in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 8 Oct 2008, 04:29 PM
  5. Bug? Category Specific CSS won't work on category id 1
    By alanekilauea in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Sep 2007, 08:18 PM

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