Zen Cart Logo
Forums / Features Wish List / Ability to switch templates for cPaths

Ability to switch templates for cPaths

Locked

Views: 1,250

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
16 Dec 2007, 01:10
#1
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Ability to switch templates for cPaths

To be able to switch the templates for cPaths by creating a folder specific to certain categories. For instance: /includes/templates/cPath_Specific_Template_Folder

have a couple of tpl files in there that would adjust the display of a product category page.

As far as Why, How, Who, When, etc, I think the benefits of this sort of thing are pretty obvious. You can only achieve so much with a stylesheet.

16 Dec 2007, 05:29
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Ability to switch templates for cPaths

You can have different header image for different categories
Earlier thread below explains how...
http://www.zen-cart.com/forum/showthread.php?t=82699

16 Dec 2007, 05:51
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Ability to switch templates for cPaths

The Smart Backgrounds code first posted in that thread can be applied to requiring a category- or page-specific template file, too.

Of course, there is already at least some of that ability built into the ZC structure (though when I first tried to use it, it wouldn't work - probably me not fully understanding the setup).

16 Dec 2007, 17:24
#4
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Ability to switch templates for cPaths

thank you misty and gjh42,

I will look into what you say. I will post here if I find a specific solution for changing the templates for a category.

Oh, I see that Smart Backgrounds module might give me the ability to do exactly what I want.

16 Dec 2007, 17:28
#5
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Ability to switch templates for cPaths

You can also use method below, which saw in another
thread..have tried/tested and it works..

Why not do a stylesheet for the category call it c_4.css
Where 4 would be the category for "shirts"

the stylesheet would consist of declarations used only by that category.

You could change the header_bg image and any thing else to make that page unique.

The stylesheet would only be called when that category page is displayed.

doing this saves messing with the core code.