Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2009
    Location
    South Portland, ME
    Posts
    2
    Plugin Contributions
    0

    help question Unique Footer for Index

    Thanks in advance -

    I'm relatively new to Zen Cart, and can't find a thread that answers my question.

    I'm trying to create a unique footer for the index page of a site I'm working on. Unfortunately, the template for the site was customized by a third-party developer, so I'm finding that a good bit of the admin has been changed. I am, however, comfortable with php and html if the answer can be found in the file structure.

    Any advice or help would be greatly appreciated.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unique Footer for Index

    The template has nothing to do with the admin, so this developer must really have messed with it a lot. If they have significantly changed even the admin, the template file structure may be unrecognizable to us.
    A link to see your site may let us guess how much the template structure has been changed.

    There is a built-in system for using custom copies of template files on specific page names, but "index" will catch both the home page and listing pages. You will (probably) need to add some code to the top of /includes/templates/your_template/common/tpl_footer.php.
    PHP Code:
    if ($this_is_home_page){
      
    //use your custom footer code here
    }else{
      
    //wrap this around all of the standard footer code





  3. #3
    Join Date
    Aug 2009
    Location
    South Portland, ME
    Posts
    2
    Plugin Contributions
    0

    Default Re: Unique Footer for Index

    Glenn,

    Thanks for the response. I tried adding your code to the tpl_footer.php file, but it didn't work.

    Actually, no edits to that file show up on the site, and rather, it seems that the footer code is found in the tpl_main_page.php file. Thus, I tried the same code in this file, but for some reason, only the else condition is met and the standard site-wide footer is shown.

    Do I need to define the $this_is_home_page variable, and if so, where should I do that?

    Here's the site if you think it might help:
    http://www.alpineh2o.com

    Thanks again

  4. #4
    Join Date
    Jan 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: Unique Footer for Index

    Hello,

    Just bumping this as I would like to remove the header and footer from a selection of pages and don't know how. What exactly needs to go into the if($xxxxxxxx) bit?

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unique Footer for Index

    totalsam - For your question, you would edit
    /includes/templates/your_template/common/tpl_main_page.php. The comments at the top of that file describe how to disable header, footer, etc. for any given page(s).

    button-up - You have a *very* old version of Zen Cart:
    // $Id: stylesheet.css 1223 2005-04-22 03:46:20Z ajeh $
    This would probably be version 1.2.4 or 5. It is completely table-based layout (harder to customize), and lacks many security features (probably four years' worth of them). It also doesn't have the $this_is_home_page variable, so that will do nothing for you in this case.

    You really need to upgrade this site to v1.3.8a, which will require rebuilding the template, for the safety of the site.

  6. #6
    Join Date
    Jan 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: Unique Footer for Index

    Hello,
    This works fine with any page that runs via the index.php but mine doesn't its an additional mod that uses a different page name completely and this method does not work for this.
    Any ideas?

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unique Footer for Index

    If your mod has a pagename (shows in the address bar at the top of your screen as main_page=pagename), you can use that pagename in the test:
    PHP Code:
    if (in_array($current_page_baseexplode(',''pagename')){
      
    $flag_disable_footer true;


  8. #8
    Join Date
    Jan 2009
    Posts
    126
    Plugin Contributions
    0

    Default Re: Unique Footer for Index

    The mainpage that you are talking about will only appear when the address reads

    www.mywebsite.com/index.php?main_page='PAGE_NAME'

    this address reads

    www.mywebsite.com/mod.php?etc

  9. #9
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Unique Footer for Index

    So your mod page is completely outside the ZC structure... that makes it trickier. It would help to see this live in order to better understand the situation. You may need page-specific styling to hide the sidebars rather than completely disabling them.

 

 

Similar Threads

  1. Unique multimedia header for home page. Regular for all others. How?
    By Bachus in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jun 2011, 10:00 AM
  2. How to change text in footer on index
    By flashmxfreak in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Mar 2008, 09:11 AM
  3. UNIQUE and INDEX keys should not both be set for column `configuration_key`
    By blind1 in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 25 Jun 2007, 02:14 AM
  4. how: a unique footer for every product and category
    By profitshock in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 1 Oct 2006, 04:47 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