Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Location
    SF Bay Area, California, USA
    Posts
    89
    Plugin Contributions
    0

    Default 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

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

    Default 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.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Aug 2005
    Location
    SF Bay Area, California, USA
    Posts
    89
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Copying & Editing /common/tpl_main_page.php

    You are most welcome ... hope that helps you out ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Aug 2005
    Location
    SF Bay Area, California, USA
    Posts
    89
    Plugin Contributions
    0

    Default 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

  7. #7
    Join Date
    May 2011
    Posts
    15
    Plugin Contributions
    0

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

 

 

Similar Threads

  1. v150 Editing tpl_main_page.php problem
    By jackolive in forum General Questions
    Replies: 8
    Last Post: 18 Sep 2012, 07:36 AM
  2. need html_header.php & tpl_main_page.php files
    By marvin in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Nov 2011, 06:32 PM
  3. PHP help with broken tpl_main_page.php
    By HeresySnowboarding in forum General Questions
    Replies: 4
    Last Post: 18 Sep 2008, 07:48 PM
  4. tpl_main_page.php where is it?
    By misty16 in forum General Questions
    Replies: 3
    Last Post: 15 Oct 2006, 04:53 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR