Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    16
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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

  3. #3
    Join Date
    Feb 2006
    Posts
    16
    Plugin Contributions
    0

    Default 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

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default 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

  5. #5
    Join Date
    Feb 2006
    Posts
    16
    Plugin Contributions
    0

    Default 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

  6. #6
    Join Date
    Apr 2005
    Posts
    11
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. Category and/or individual page css override
    By Vlyn in forum Templates, Stylesheets, Page Layout
    Replies: 17
    Last Post: 25 Dec 2011, 05:23 AM
  2. Remove sub-category image from individual product pages?
    By mtmnet in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 18 Jul 2009, 05:04 PM
  3. Can you skip sub category page?
    By hzp in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 6 Aug 2008, 11:40 AM
  4. Can you move side boxes only on Sub-Cat pages?
    By LilleyPadGifts in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 31 Mar 2007, 01:56 AM
  5. How to override an individual category's header
    By staceyb in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Aug 2006, 09:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg