Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Override system vs New Template

Override system vs New Template

Locked

Views: 1,276

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
24 Jun 2009, 11:16 AM
#1
pharry avatar

pharry

Zen Follower

Join Date:
Jun 2009
Posts:
131
Plugin Contributions:
0

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?

24 Jun 2009, 11:41 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

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.

24 Jun 2009, 12:53 PM
#3
pharry avatar

pharry

Zen Follower

Join Date:
Jun 2009
Posts:
131
Plugin Contributions:
0

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!