Thread: Directories??

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2009
    Location
    Far Far Away
    Posts
    20
    Plugin Contributions
    0

    Default Directories??

    Hey there,

    I have been looking around but I cannot see what the directory for the home page is. What I am trying to do is modify the home page using the instructions mentioned in tpl_main_page.php

    /templates/MY_TEMPLATE/privacy/tpl_main_page.php

    so I need the "privacy" replaced with the home page dir please.

    Regards,
    Johan

  2. #2
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Directories??

    I'm not sure what you're trying to do. tpl_main_page.php
    is located in includes/templates/template_default/common. Make your changes and save it to includes/templates/MY_TEMPLATE/common.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  3. #3
    Join Date
    Jul 2009
    Location
    Far Far Away
    Posts
    20
    Plugin Contributions
    0

    Default Re: Directories??

    Quote Originally Posted by afo View Post
    I'm not sure what you're trying to do. tpl_main_page.php
    is located in includes/templates/template_default/common. Make your changes and save it to includes/templates/MY_TEMPLATE/common.
    The problem with that is that is changes he layout of all the pages. I just want to change the layout of the home page without affecting the other pages.

    example: to override the privacy page
    make a directory /templates/MY_TEMPLATE/privacy
    copy /templates/templates_defaults/common/tpl_main_page.php to
    /templates/MY_TEMPLATE/privacy/tpl_main_page.php

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Directories??

    Could it be you are looking to change a 'define' page?

    includes/languages/english/html_includes/YOUR_TEMPLATE/define_main_page.php

    The above file is the one to edit for changing some of what is shown on your Index / Home page of Zen Cart.

  5. #5
    Join Date
    Jul 2009
    Location
    Far Far Away
    Posts
    20
    Plugin Contributions
    0

    Default Re: Directories??

    Quote Originally Posted by Website Rob View Post
    Could it be you are looking to change a 'define' page?

    includes/languages/english/html_includes/YOUR_TEMPLATE/define_main_page.php

    The above file is the one to edit for changing some of what is shown on your Index / Home page of Zen Cart.
    This only affect the content and not the layout of the page

  6. #6
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: Directories??

    Quote Originally Posted by jrheeder View Post
    The problem with that is that is changes he layout of all the pages. I just want to change the layout of the home page without affecting the other pages.

    example: to override the privacy page
    make a directory /templates/MY_TEMPLATE/privacy
    copy /templates/templates_defaults/common/tpl_main_page.php to
    /templates/MY_TEMPLATE/privacy/tpl_main_page.php
    I don't know where you got this notion from. There is no /privacy folder in Zen Cart. It won't know to look in there to find the tpl_main_page.php. What exactly are you trying to do?
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Directories??

    For those of us who were schooled in HTML for many years, moving to CM dynamic content sites produces a "huh???" effect for quite a while.

    There are only a tiny handful of files in zc that can be condsidered "flat html" - and even then they are run as PHP files.

    Pages in these systems "do not exist" until and unless they are called by the PHP code. This code "gathers up" a whole lot of elements, data, information and resources from many places - including other files and the database.

    It then "cobbles together" a page (assembles it in real html) and then throws the result to the browser.

    The minute a viewer navigates away from that page, it "evaporates".

    Layout can be controlled in three areas:

    1. The structure of certain php files and the position of elements inside them
    2. The CSS stylesheets
    3. Switches and settings in the database.

    If you are a lot more specific about what you want to alter, we may be able to point you in the right direction.
    20 years a Zencart User

  8. #8
    Join Date
    Jul 2009
    Location
    Far Far Away
    Posts
    20
    Plugin Contributions
    0

    Default Re: Directories??

    Quote Originally Posted by afo View Post
    I don't know where you got this notion from. There is no /privacy folder in Zen Cart. It won't know to look in there to find the tpl_main_page.php. What exactly are you trying to do?

    I thought I was clear in my asking .

    Ok lets try this again. To edit a specific page's layout you would create a new folder using the page's name inside your template folder for my example I will use page About Us example

    /includes/templates/MY_TEMPLATE/about_us

    Now inside this folder you would place a copy of the tpl_main_page.php and then edit this to avoid messing up any other layout on any other pages. Thus making use of the "Override system"

    /includes/templates/MY_TEMPLATE/about_us/tpl_main_page.php
    Ok now I just want to know what the pagename of the home page is so I can edit the layout of the home page without messing us the rest of the pages, because the tpl_main_page.php in the common folder only defines the site-wide "default" layout of your site template

    Does this make it a bit more clear?

    Regards,
    Johan

    P.S.

    If you look in the tpl_main_page.php right at the top it has this

    Code:
    <?php
    /**
     * Common Template - tpl_main_page.php
     *
     * Governs the overall layout of an entire page<br />
     * Normally consisting of a header, left side column. center column. right side column and footer<br />
     * For customizing, this file can be copied to /templates/your_template_dir/pagename<br />
     * example: to override the privacy page<br />
     * - make a directory /templates/my_template/privacy<br />
     * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />
     * <br />
    ...

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Directories??

    Ok now I just want to know what the pagename of the home page
    includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php


    It is a different story if you are trying to edit / create:

    includes/templates/YOUR_TEMPLATE/privacy/tpl_main_page.php


    So the question is; "Which page are you wanting to work with?"

  10. #10
    Join Date
    Jul 2009
    Location
    Far Far Away
    Posts
    20
    Plugin Contributions
    0

    Default Re: Directories??

    The home page of the site the first page you see when you log into the site.

    So all I want is to know what the pagename of the home page is, the first page you see when you log onto the site
    Last edited by jrheeder; 8 Jul 2009 at 03:51 PM.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Custom Directories
    By Webfoot in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Apr 2009, 07:23 AM
  2. Missing Directories
    By Nora in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Sep 2008, 05:26 PM
  3. Installation Directories
    By GarthG in forum Installing on a Windows Server
    Replies: 6
    Last Post: 17 Dec 2007, 09:26 AM
  4. Changing directories
    By gfiggins in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Sep 2007, 04:49 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