Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Posts
    27
    Plugin Contributions
    0

    Default CSS applied to product listing page in specific categories only

    Hi,
    Is it possible to load a stylesheet dependent upon the category being viewed.
    I need to style the product listing table differently in one area of a site without affecting how those products appear in the normal product listing pages.

    I would need one stylesheet for the majority of pages, but some categories and sub-categories need a separate stylesheet loading?

    Help or sggestions appreciated!
    Cheers,
    Rob

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

    Default Re: CSS applied to product listing page in specific categories only

    Look in /includes/templates/template_default/css/CSS_read_me.txt.

    It explains how to use per-category stylesheets.

    Note that a stylesheet can only operate on elements with distinct class/id/tag handles, which you may sometimes need to add to the PHP code.

  3. #3
    Join Date
    Dec 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: CSS applied to product listing page in specific categories only

    Thank you again.
    This category dependent stylesheet is directly related to my other question that you have answered. Is there a logical way for me to test for a list of categories/sub-categories and apply the separate stylesheet to those in the same way?

    There will be multiple categories, each with multiple sub-categories that this needs to apply to.
    Cheers,
    Rob

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

    Default Re: CSS applied to product listing page in specific categories only

    It is possible to apply the stylesheet to a category and its subs, but I don't have that information at hand. It requires modifying one or more PHP files.

    The issue has been discussed and methods posted here several months ago, perhaps a year or more. Clydejones was one of the posters involved.

  5. #5
    Join Date
    Dec 2007
    Posts
    27
    Plugin Contributions
    0

    Default Re: CSS applied to product listing page in specific categories only

    This has been resolved now.
    In my editing a template over-ride for the product listing page, I've coded in some alternate classes for the specific sub-sections required.

    Thanks for all your help!
    Cheers,
    Rob

 

 

Similar Threads

  1. Specific sideboxe to show on specific page only
    By nicksab in forum General Questions
    Replies: 18
    Last Post: 17 Jul 2012, 07:22 AM
  2. Use product listing row layout for certain sub categories only
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 Jun 2010, 11:55 PM
  3. Specific Product Listing CSS file
    By jadedchron in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Jan 2010, 12:01 AM
  4. Why does this only work in the product listing - CSS puzzle
    By budfox in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Feb 2007, 08:28 AM
  5. Product listing of specific categories
    By seville in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Aug 2006, 09:34 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