Forums / Templates, Stylesheets, Page Layout / Can you override individual (sub)category pages?

Can you override individual (sub)category pages?

Locked

Views: 3,695

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
5 Feb 2007, 1:51 PM
#1
jrbeck avatar

jrbeck

New Zenner

Join Date:
Feb 2006
Posts:
16
Plugin Contributions:
0

Can you override individual (sub)category pages?

Hi All,
I have figured out how to override individual pages by using a folder that uses that particular page's name. For example, to override only the contact_us page create a directory like this: /includes/templates/YOURTEMPLATE/contact_us/ and then put whatever specific files in that I need to override.

My question is, can I do this for a specific (sub)category product listing? For example, I want to override 'tpl_modules_product_listing.php' for subcategory 9, but not subcategory 11. I figured out that you can create an override folder for the 'index' file like this: /includes/templates/YOURTEMPLATE/index/, but that then changes the display of all index pages. I only want to modify index pages for particular categories. I know you can easily create individual stylesheets for a particular page or category, so I'm hoping the same is true for overrides. If anyone knows if this is possible, I would appreciate the help.

Cheers,
Jason

5 Feb 2007, 4:08 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can you override individual (sub)category pages?

For example, to override only the contact_us page create a directory like this: /includes/templates/YOURTEMPLATE/contact_us/ and then put whatever specific files in that I need to override.
Actually the correct method for the contact_us.php page is

includes/languages/english/html_includes/your_template/contact_us.php

You should first review the use of overrides in the FAQ's & wiki so that you are approaching this correctly

Zen-Venom Get Bitten

5 Feb 2007, 5:15 PM
#3
jrbeck avatar

jrbeck

New Zenner

Join Date:
Feb 2006
Posts:
16
Plugin Contributions:
0

Re: Can you override individual (sub)category pages?

Maybe I wasn't clear. What I want to do is place an imagemap in certain (sub)category product listing pages, but not others. My idea on how to do this came from a post by Dr. Byte here.

He said:

  1. You can override the tpl_footer.php on each page by placing unique versions of it in override folders like this:
    /includes/templates/YOURTEMPLATE/PAGENAME/tpl_footer.php
    where PAGENAME could be product_info or contact_us or checkout_shipping etc.

I figured I could make a directory like he stated for certain subcategory product listing pages. Then, in these directories I could place a modified version of tpl_modules_product_listing.php with the image map I want (which is different for each one). But, I cannot tell if this is possible. As I stated, I did use this method to create a directory for index.php, but this then modifies all (sub)category product listings, not just specific ones.

So my question is, is it possible to create individual directories in this way for specific subcategories? Or, does someone have a better idea of how to acheive my goal?

Kobra - perhaps you have a better way to achieve this which you could elaborate upon? I have read everything the faq and wiki have to say about overrides and read posts on this forum all day long. Since I got stuck I have been playing with css to do this but still think an individual page override is the way to go.

Cheers,
Jason

5 Feb 2007, 5:29 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Can you override individual (sub)category pages?

My initial post to this was only prompted by your path to the contact_us override that is not in the normal method for this page. It should be as I posted.

DrByte I believe posted your reference for a possible work around or custom infividual page and he does know this intimately.

I figured I could make a directory like he stated for certain subcategory product listing pages. Then, in these directories I could place a modified version of tpl_modules_product_listing.php with the image map I want (which is different for each one). But, I cannot tell if this is possible. As I stated, I did use this method to create a directory for index.php, but this then modifies all (sub)category product listings, not just specific ones.
As this is all in override folders I would try it...it will either work or not.

Zen-Venom Get Bitten

6 Feb 2007, 10:28 PM
#5
jrbeck avatar

jrbeck

New Zenner

Join Date:
Feb 2006
Posts:
16
Plugin Contributions:
0

Re: Can you override individual (sub)category pages?

I tried various directory names for the subcategory directories, but none worked. I have a feeling its not possible. In the mean time, I have been able to accomplish what I wanted using css image maps on a background image. Its nice that you can easily define a unique css file for any page or (sub)directory in zencart. I like that flexibility. I'll continue to pursue the original idea as I would still rather do that because the css way has certain limitations.

Cheers,
J

7 Mar 2007, 5:12 AM
#6
uasport avatar

uasport

New Zenner

Join Date:
Apr 2005
Posts:
11
Plugin Contributions:
0

Re: Can you override individual (sub)category pages?

jrbeck, can you provide a link to your site. i'm interested in doing the same thing with my category pages.

21 May 2007, 4:46 AM
#7
xena avatar

xena

Zen Follower

Join Date:
Jun 2004
Location:
Northern Rivers, NSW
Posts:
143
Plugin Contributions:
0

Re: Can you override individual (sub)category pages?

Did you guys figure this one out?
I have used the Dr Byte method of "/includes/templates/YOURTEMPLATE/PAGENAME/tpl_footer.php" for just about every single page (each page has different content) but no folder name changes only sub-category pages. It's a PITA and something that doesn't appear to have been answered anywhere on the site (been searching for about 3 hours now :frusty: )