Custom Category Page

Started by windsurfer on 6 May 2012, 9:25 PM · Views: 2,048

Results 1 to 9 of 9
6 May 2012, 9:25 PM
#1
windsurfer avatar

windsurfer

Zen Follower

Join Date:
Jun 2011
Posts:
185
Plugin Contributions:
0

Custom Category Page

I haven't been able to find anything on this but just wondering if it is possible to have 1 or more categories use a custom layout so it is different from the one in the template now (using classic) if you look at this page the spacing is not very good and i would like it to look like this page . Any help would be appreciated.
Thank you

If you wait to do everything until you're sure it's right, you'll probably never do much of anything !!!

7 May 2012, 12:17 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,127
Plugin Contributions:
56

Re: Custom Category Page

You can define category- and product-specific styling using the built-in features of zen cart; just take a peek at /includes/templates/classic/css/CSS_read_me.TXT.

8 May 2012, 2:02 AM
#3
windsurfer avatar

windsurfer

Zen Follower

Join Date:
Jun 2011
Posts:
185
Plugin Contributions:
0

Re: Custom Category Page

lat9:

You can define category- and product-specific styling using the built-in features of zen cart; just take a peek at /includes/templates/classic/css/CSS_read_me.TXT.Hi Lat9I appreciate that thank you, but the problem remains how do i change the layout of the cell phone manufacturers page and not affect the other category pages, i'm not quite sure if that can be accomplished.Regards

If you wait to do everything until you're sure it's right, you'll probably never do much of anything !!!

8 May 2012, 4:05 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Custom Category Page

You need to make a category-specific stylesheet per the CSS_read_me file, as mentioned by lat9.
This can affect the spacing for just one category.

8 May 2012, 11:58 AM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,127
Plugin Contributions:
56

Re: Custom Category Page

Since you're using some kind of SEO manager, I'm not sure what the category your phone manufacturers page is ... but, let's say that the cPath associated with that category is 70_102. If so, you'd create the file /includes/templates/classic/css/c_70_102.css file and make your edits there.

13 May 2012, 9:24 PM
#7
windsurfer avatar

windsurfer

Zen Follower

Join Date:
Jun 2011
Posts:
185
Plugin Contributions:
0

Re: Custom Category Page

gjh42:

And in c_70_102.css, you should have only the rule(s) that you want different from standard, not the whole stylesheet.Hi Thank you for the advise. I will be working on that but i am not sure which PHP page i need to edit so that the CUSTOM css file loads, I use the classic template and looked at the index.php , tpl_main_page.php and html_header.php files but i don't see anything there that would load the css file. Could you direct me to the proper file please.Thank you

If you wait to do everything until you're sure it's right, you'll probably never do much of anything !!!

14 May 2012, 12:33 AM
#8
windsurfer avatar

windsurfer

Zen Follower

Join Date:
Jun 2011
Posts:
185
Plugin Contributions:
0

Re: Custom Category Page

windsurfer:

Hi Thank you for the advise. I will be working on that but i am not sure which PHP page i need to edit so that the CUSTOM css file loads, I use the classic template and looked at the index.php , tpl_main_page.php and html_header.php files but i don't see anything there that would load the css file. Could you direct me to the proper file please.Thank youI just downloaded Categories Dressing v2.7.3 and tried to follow the directions which for an expert like your self are easy to follow but are clear as mud to a novice like myself.The category i am trying to customize is called cell_phone_manufacturers // to make a specific category stand out define a new class in the stylesheet example: #categories li.cat-holiday a (do i rename this #categories li.cat-cell_phone_manufacturersday a) ? and which stylesheet do i edit the stylesheet.css or the stylesheet that came with this mod ?// 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'): do i sub the 3 with "cell_phone_manufacturers" ?// $new_style = 'holiday'; Do i rename this to "cell_phone_manufacturers" ?// break;Help would be appreciated.

If you wait to do everything until you're sure it's right, you'll probably never do much of anything !!!

14 May 2012, 3:10 AM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: Custom Category Page

cell_phone_manufacturers is not a category id, but a (URL rewriter's version of a) category name.

The "cat-holiday" is an example of a made-up designation for a category and not necessarily related to the category's name or id. This example is from the comments in the original 2003 version of the file; for my v2.8 mod file I have recast the designation as cat-special-category to hopefully make it clearer what it is. You can use any name here, as long as you use the identical name in your stylesheet. You could put the rule in your main stylesheet, but it would be easier to manage if you put it in stylesheet_categories_dressing.css following the example that is already in that file.

However, according to your original request, you have no business with Categories Dressing anyway. That handles only the categories sidebox, NOT any particular category page. If you name your custom stylesheet like c_70_102.css (using the correct cPath or category id number) and save it in your template's /css/ folder, it will automatically be loaded for that category and no other. You don't need to edit any PHP file. Lat9 and I were not leaving out critical information in our previous posts.