Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2007
    Posts
    25
    Plugin Contributions
    0

    Default need to add a div on all pages, best way?

    I need to add a new div which will contain all the page content. This is because I need to have two background images on all pages. What is the best way to acheive this?
    I need
    <body>
    <div id="myDiv">
    ....all the current page html...
    </div>
    </body>

    Will the existing CSS still work and how can I do this in a supported way? I have my own theme/template running so can use the overrides system.

    Thanks.

  2. #2
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    541
    Plugin Contributions
    0

    Default Re: need to add a div on all pages, best way?

    This is located in \includes\templates\YOUR_TEMPLATE\common\tpl_main_page.php

  3. #3
    Join Date
    Feb 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: need to add a div on all pages, best way?

    Excellent, exactly what I needed.

    Thanks tino.

  4. #4
    Join Date
    Dec 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: need to add a div on all pages, best way?

    Hmmm, actually the file "tpl_main_page.php " is not located in the folder of any of my templates. For sure (I triple-checked) the only contents are:

    1) "css" folder
    2) "images" folder
    3) template_info.php

    What can I modify to add an extra div page container?

  5. #5
    Join Date
    Nov 2007
    Location
    Melbourne, Australia
    Posts
    541
    Plugin Contributions
    0

    Default Re: need to add a div on all pages, best way?

    The name 'YOUR_TEMPLATE' have to be replaced with the name of your template folder. For the classic temaplte it is 'classic'. If you have installed another template, the name is different. Read the tutorial about the override system to understand the folder structure.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,511
    Plugin Contributions
    126

    Default Re: need to add a div on all pages, best way?

    Just like you have created YOUR_TEMPLATE/css/stylesheet.css, you can create YOUR_TEMPLATE/common/tpl_main_page.php as Tino has suggested. You can mirror anything from includes/templates/template_default in your own includes/templates/YOUR_TEMPLATE folder, and customize as desired. You don't currently have a "common" folder simply because you haven't yet changed anything. The beauty of the Zen Cart override system is that you only have to create things as you need to change them.
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Dec 2009
    Posts
    5
    Plugin Contributions
    0

    Default Re: need to add a div on all pages, best way?

    Ahhh, you guys are awesome! And you responded so fast! I created the new YOUR_TEMPLATE/common/tpl_main_page.php file, and now my div works. Thank you so much!

 

 

Similar Threads

  1. Looking for best way to add pics to informational pages
    By BuddyS in forum General Questions
    Replies: 1
    Last Post: 15 Nov 2015, 02:37 AM
  2. Best Way To Delete All Default Zen Products?
    By trickobrien in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 9 Aug 2010, 06:39 PM
  3. Best or easiest way to add "Free Gift Wrap" Option for all items?
    By noelsaw in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 5 Sep 2009, 01:38 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