Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / CSS sheet for category and all SUB categories?

CSS sheet for category and all SUB categories?

Locked

Views: 1,392

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
30 Jun 2007, 2:11 AM
#1
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

CSS sheet for category and all SUB categories?

Hi folks.

creating a style sheet c_1.css works as expected.

But how would I name the sheet so it applied to:

1_22
1_22_7
... as well.

I guess I'm wondering how to name it so c_1.css applies to the whole category tree.

I would have c_2.css for the next top level category and all the sub categories under it.

Do I really need to make a style sheet for each sub category?

Thanks Much!

30 Jun 2007, 2:28 AM
#2
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: CSS sheet for category and all SUB categories?

Why are you creating a "new" stylesheet for the category tree?

You can use the default stylesheet to do it and set as needed to control the whole thing (If I hear you correctly, the functionality you are looking for is already built in)?

Or, you can create on new stylesheet, and just include ALL of the styles you want to reference in the category tree in that. Then, when it loads with the rest of the site, it will be fully controlled from there?

Make sense?

I see no need to create a new styelsheet for each category / subcategory when the whole thing is controlled from the main stylesheet as well.

What exactly are you trying to achieve? Knowing the idea may help solve the issue. :smile:

Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information

30 Jun 2007, 3:13 AM
#3
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: CSS sheet for category and all SUB categories?

econcepts:

Why are you creating a "new" stylesheet for the category tree?

You can use the default stylesheet to do it and set as needed to control the whole thing (If I hear you correctly, the functionality you are looking for is already built in)?

Or, you can create on new stylesheet, and just include ALL of the styles you want to reference in the category tree in that. Then, when it loads with the rest of the site, it will be fully controlled from there?

Make sense?

I see no need to create a new styelsheet for each category / subcategory when the whole thing is controlled from the main stylesheet as well.

What exactly are you trying to achieve? Knowing the idea may help solve the issue. :smile:

I want to use a -unique- style sheet for each of my -top level- categories, and have that style sheet apply to all the -sub categories- under it as well.

For instance, instead of this:

Top Level Category 1 (and everything below it)
c_1.css
c_1_1.css
c_1_1_1.css
c_1_2.css
c_1_2_1.css

Top Level Category 2 (and everything below it)
c_2.css
c_2_1.css
c_2_1_1.css
... and on and on...

This:

Top Level Category 1

cat1_and_all_sub_categories_under_cat1.css

Top Level Category 2

cat2_and_all_sub_categories_under_cat2.css

I'm trying to name a style sheet so I only have to make ONE for each top level category, instead of one for each and every sub category.

Does that make more sense?

30 Jun 2007, 4:05 AM
#4
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: CSS sheet for category and all SUB categories?

Actually, I'd be happy if anyone could tell me if this is even possible...

30 Jun 2007, 5:52 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: CSS sheet for category and all SUB categories?

Someone has done this, and posted about it here. It was a few months ago now, and all I remember is that it was in a thread where clydejones was posting.
If you find it, it would be beneficial to post a link here for general edification.

30 Jun 2007, 7:34 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,843
Plugin Contributions:
17

Re: CSS sheet for category and all SUB categories?

If you have your stylesheet named c_12.css and you have loaded it to the css directory for your template, it should control all items under category 12. Make sure you are using the actual category number and not it's number in line.

Take a look at http://www.zen-cart.com/forum/showthread.php?t=62052 for more info because you don't want to be too redundant in your stylesheets.:no:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com