Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Copying & Editing /common/tpl_main_page.php

Copying & Editing /common/tpl_main_page.php

Views: 2,434

Results 1 to 7 of 7
18 May 2006, 9:28 PM
#1
chrx avatar

chrx

New Zenner

Join Date:
Aug 2005
Location:
SF Bay Area, California, USA
Posts:
84
Plugin Contributions:
0

Copying & Editing /common/tpl_main_page.php

Hi,

I want to create an alternate version of the common/tpl_main_page.php file that is currently in my /my_temlate/ directory.

I then want to make a small number of pages use the alternate version, while every other page uses the original file.

First, is it possible for a specific page, say Contact Us to call up an alternate version of that file, or does the logic run the wrong way to let that happen?

Second, If it is possible to do this, any clues as to where would I look to find the reference point for that small number of pages to grab the alternate version instead of the original?

Thanks,
chrx

18 May 2006, 9:53 PM
#2
kobra avatar

kobra

Black Belt

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

Re: Copying & Editing /common/tpl_main_page.php

I am not a coder, but what you want will require that you edit at least each file that you want changed for where it references the tpl_main_page
i.e. contact.php, and the others that you want altered. There are many inter-dependant relationships that could cause woes. I am not enough of a coder to point you any more than I have or inform you of what to watch for.

18 May 2006, 10:26 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying & Editing /common/tpl_main_page.php

Did you read the example in the tpl_main_page.php file on how to do the overrides per page?

18 May 2006, 11:44 PM
#4
chrx avatar

chrx

New Zenner

Join Date:
Aug 2005
Location:
SF Bay Area, California, USA
Posts:
84
Plugin Contributions:
0

Re: Copying & Editing /common/tpl_main_page.php

Wow, I looked at those comments before (in tpl_main_page.php) and they did not make much sense to me, as I had no context for it.

Reading it now, given your advice, it sounds like it is going to be too easy! I'll take some time with it and start experimenting.

Thanks again!
chrx

18 May 2006, 11:49 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Copying & Editing /common/tpl_main_page.php

You are most welcome ... hope that helps you out ... :smile:

19 May 2006, 4:38 AM
#6
chrx avatar

chrx

New Zenner

Join Date:
Aug 2005
Location:
SF Bay Area, California, USA
Posts:
84
Plugin Contributions:
0

Re: Copying & Editing /common/tpl_main_page.php

Ah,

Once again, the beauty fo the ZC override system makes the world a better place!

This is great.

Can the same system apply to the /common/html_header.php? I don't see any comments to that effect in that file.

Thanks,
chrx

8 May 2011, 4:16 AM
#7
sunrise11 avatar

sunrise11

New Zenner

Join Date:
May 2011
Posts:
24
Plugin Contributions:
0

Re: Copying & Editing /common/tpl_main_page.php

I'm interested in editing the /common/tpl_main_page.php page as well and will use the override system, of course.

I want all pages to have the same layout except for the shopping cart pages.

If I edit this page, will it affect the shopping cart pages as well? I believe that they are generated from a different template but want to make sure.

Thanks.