Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default CSS per category doesn't seem to work.

    I'm trying to make a category specific css file, but it shows up on every page, not just in the targeted category. The category_id = 1, and i have tried all of the following combinations (there are no subcategories)

    c_1.css
    c_1_0.css
    c_1_00.css
    c_01_00.css

    What am I doing wrong?

    Thanks!

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: CSS per category doesn't seem to work.

    Make sure the c_?_?.css matches the "cpath"

    /index.php?main_page=index&cPath=15

    in this case c_15_00.css

  3. #3
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default Re: CSS per category doesn't seem to work.

    Thanks for the response, but that is not the problem. The problem is that the css file ALWAYS is displayed inside and outside the category (and yes, I'm using the correct "cpath." If I put a stylesheet in the css folder, and call it c_15_00.css or whatever, it ALWAYS shows up. There is no filtering happening. I checked the html_header.php file to see if that was the problem but its not.

    Quote Originally Posted by clydejones
    Make sure the c_?_?.css matches the "cpath"

    /index.php?main_page=index&cPath=15

    in this case c_15_00.css

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: CSS per category doesn't seem to work.

    Do you have a URL i can take a peek at?

  5. #5
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: CSS per category doesn't seem to work.

    I took a look and apparently you have something commented out.

    Code:
    http://www.moissaniteco.com/13/includes/templates/Custom/css/c_25_00.css
    
    /* .solCt a{background:url(../images/Sidebox/catbox_roll.gif) no-repeat !important;} */
    
    If it's commented out, its not going to show up.

  6. #6
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default Re: CSS per category doesn't seem to work.

    Yeah, i know. The point is the css shows up on every page. So what ever css I have in that stylesheet WILL show up on every page, not just in the specific category.

  7. #7
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,039
    Plugin Contributions
    31

    Default Re: CSS per category doesn't seem to work.

    The style sheet will load in any case.

    You had 3 or 4 that were loading.

    If you make c_25.css unique for that category it will only take effect when that category is present.

    Take a look at mysticmountainnaturals.com/newshop

    click on MMN for women and notice how the header image changes, then click the home link or any other link and watch the header image change.

    If you click on any of the sub categories under MMN for women the header image won't change because they are sub categories.

  8. #8
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default Re: CSS per category doesn't seem to work.

    Yes I understand that. The point still is on your site, when you are not in category 15, the stylesheet c_15_00.css DOES NOT APPEAR in the html. On my site, for whatever reason (apparently something is broken) the stylesheet ALWAYS appears even though it is name for a specific category.

  9. #9
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default Re: CSS per category doesn't seem to work.

    Weird! I went and slept on it, did EXACTLY the same thing as last night, and now it works. Too bizarre. For those who are reading this, I've found that for single digit categories, c_1_00 works while c_01_00 does not, at least for me.

  10. #10
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    1,417
    Plugin Contributions
    1

    Default Re: CSS per category doesn't seem to work.

    Maybe there is a glitch with 1.3.01. If you look at the first category, Solitaires, the css c_1_00.css appears. If you navigate to another category it is correctly filtered out. BUT if you go to any other page outside of the category listing (ie shopping cart, about us, contact us, etc.) all of the category specific stylesheets are not filtered out and appear!

    Look here: http://www.moissaniteco.com/13/moiss...aires-c-1.html

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Display Category and Sub Category... old link doesnt work anymore
    By DirkDiggler in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 10 Feb 2007, 09:26 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
  •