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!
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
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
Re: CSS per category doesn't seem to work.
Do you have a URL i can take a peek at?
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.
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.
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.
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.
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.
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! :Flush:
Look here: http://www.moissaniteco.com/13/moiss...aires-c-1.html