Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    131
    Plugin Contributions
    0

    Default Override system vs New Template

    I think I've read myself into a circle here, and I've lost the fox.

    I'm confused now in the difference between the override system and a new template.

    I created a new template and called it "mytemplate" for test purposes. I followed the FAQ. When I swapped templates in the admin, I was expecting to see a duplicate of the classic template so that I could just tweak the things I wanted to tweak. But that wasn't the case.

    So this made me think that I don't really want a new template, I want to use the override system.

    If I use the override system, can I use the name "mytemplate" for my custom folders, or will that confused Zen and make it think it's a template? Or is there really a difference?

    Am I making any sense?

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Override system vs New Template

    You got it right.

    Using the override system is creating a new template. The way is works is, when Zencart goes to create a page, it checks the override folders for the selected template for any files, and if there are any, it uses those to create the page. Any files it needs that aren't in those folders, it gets from template_default.

    One of the things that trips up Zencart newcomers is the fact that the 'Classic' template isn't the default template. It's a sample custom template that is selected by default on installation.

    If you want your custom template to look like the 'Classic' template at first, you'll need to copy the files from the includes/templates/classic folders into the respective custom folders.

    What you saw on your first attempt was probably the template_default. Not pretty.

  3. #3
    Join Date
    Jun 2009
    Posts
    131
    Plugin Contributions
    0

    Default Re: Override system vs New Template

    Okay, I think I finally had my "ah ha!" moment! I thought that anything I put in my custom folder would get picked up and applied by ZC. But it only gets picked up if I'm actually using a template by the same name (selected from admin). If I'm not using a template by the same name, I must modify the files in the folder of the template being used. The only reason all the FAQ's, book, etc., say to be sure and backup your changes in the CUSTOM folder is strictly for backup purposes, and not because they'll get used in that folder.

    This sounds so obvious as I type it, but up until now, I thought anything I put into a custom folder would get picked up by Zen, even though I was using the classic template.

    Ah ha!

 

 

Similar Threads

  1. Override System / Commercial Template
    By Ztrains in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 24 Oct 2011, 07:17 PM
  2. Template override System
    By andrewa124 in forum Basic Configuration
    Replies: 1
    Last Post: 21 Aug 2008, 06:09 AM
  3. Confused by override system with new template
    By pcmt in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Oct 2006, 12:17 AM

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