Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    21
    Plugin Contributions
    0

    Default Left column not working in my tpl_main_page.php

    Hi, any successful templaters there?

    I'm upgrading to v1.3.7 and trying to re-create the main template page tpl_main_page.php as it was working fine on v1.3.0. I've taken the normal tpl_main_page.php file in v1.3.7 default template directory and modified it for my own look in my template over-ride folder but I can't get the left column to work (see <!-- left column code starts here -->). The URL is http://www.spectra-media.net.nz/clientsite1/gallery/

    <?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 />
    * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br />
    * to turn off the header and/or footer uncomment the lines below<br />
    * Note: header can be disabled in the tpl_header.php<br />
    * Note: footer can be disabled in the tpl_footer.php<br />
    * <br />
    * $flag_disable_header = true;<br />
    * $flag_disable_left = true;<br />
    * $flag_disable_right = true;<br />
    * $flag_disable_footer = true;<br />
    * <br />
    * // example to not display right column on main page when Always Show Categories is OFF<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    * <br />
    * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
    * <br />
    * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br />
    * $flag_disable_right = true;<br />
    * }<br />
    *
    * @package templateSystem
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: tpl_main_page.php 4886 2006-11-05 09:01:18Z drbyte $
    */

    // the following IF statement can be duplicated/modified as needed to set additional flags
    if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes _on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
    }


    $header_template = 'tpl_header.php';
    $footer_template = 'tpl_footer.php';
    $left_column_file = 'column_left.php';
    $right_column_file = 'column_right.php';
    $body_id = ($this_is_main_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
    ?>

    <body topmargin="0" id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
    <div class="smallText center">
    <table width="770" border="0" align="center" cellpadding="0" cellspacing="0" id="contentMainWrapper">
    <tr>
    <td><img src="../images/gallery/spacer.gif" width="1" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="110" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="44" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="9" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="98" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="134" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="134" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="107" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="132" height="1" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="1" border="0" alt=""></td>
    </tr>
    <tr>
    <td colspan="10" bgcolor="#9BA4AC"><img name="banner" src="../images/gallery/banner.jpg" width="770" height="65" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="65" border="0" alt=""></td>
    </tr>
    <tr>
    <td colspan="10" bgcolor="#9BA4AC"><script language="JavaScript" type="text/javascript" src="../menu/menu1a.js"> </script>
    </td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="22" border="0" alt=""></td>
    </tr>
    <tr>
    <td rowspan="3" background="../images/gallery/left-panel-edge.jpg" bgcolor="#000000"><img name="leftpaneledge" src="../images/gallery/left-panel-edge.jpg" width="1" height="446" border="0" alt=""></td>
    <td colspan="2" bgcolor="#9BA4AC"><img name="leftpaneltop" src="../images/gallery/spacer.gif" width="154" height="10" border="0" alt=""></td>
    <td colspan="5" valign="top"><img name="contenttop" src="../images/gallery/spacer.gif" width="482" height="1" border="0" alt=""></td>
    <td colspan="2" rowspan="2" background="../images/gallery/right-panel-bg.gif" bgcolor="#586A77"><img name="rightpaneltop" src="../images/gallery/right-panel-top.gif" width="133" height="243" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="10" border="0" alt=""></td>
    </tr>
    <tr>



    <!-- left column code starts here -->
    <td colspan="2" rowspan="2" valign="top" bgcolor="#9BA4AC" class="columnLeft" id="navColumnOne" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>">
    <?php
    /**
    * prepares and displays left column sideboxes
    *
    */
    ?>
    <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div>
    </td>
    <!-- left column code ends here -->



    <td rowspan="2"><img name="contentleft" src="../images/gallery/spacer.gif" width="9" height="436" border="0" alt=""></td>
    <td colspan="4" rowspan="2" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td><div id="contents" style="width:470px; height:420px; z-index:1; overflow: auto;">

    <!-- bof breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->

    <div id="bannerThree" class="banners"></div>

    <?php
    /**
    * prepares and displays center column
    *
    */
    require($body_code); ?>

    </div>
    </td>
    </tr>
    <tr>
    <td height="16" align="center" valign="bottom"> <a id=link href="../index.htm">Home</a> |&nbsp;<a id=link href="../gallery/index.php">Carpet
    Gallery</a>&nbsp;| <a id=link href="../carpet-info.htm">Carpet
    Info</a>&nbsp;|&nbsp;<a id=link href="../service-info.htm">Service
    Info</a>&nbsp;| <a id=link href="../about-us.htm">About Us</a>&nbsp;| <a id=link href="../contact-us.htm">Contact
    Us</a> </td>
    </tr>
    </table>
    </td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="233" border="0" alt=""></td>
    </tr>
    <tr>
    <td colspan="2" valign="top" background="../images/gallery/right-panel-bg.gif" bgcolor="#586A77"><img name="rightpanelbottom" src="../images/gallery/right-panel-bottom.jpg" width="133" height="203" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="203" border="0" alt=""></td>
    </tr>
    <tr>
    <td background="../images/gallery/base-line-bg.gif" colspan="10" valign="bottom"><img src="../images/gallery/base-line.jpg" width="770" height="4" border="0" alt=""></td>
    <td><img src="../images/gallery/spacer.gif" width="1" height="4" border="0" alt=""></td>
    </tr>
    </table>
    </div>
    <script language="JavaScript" TYPE="text/javascript" src="../menu/submenus.js"> </script>

    </body>

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

    Default Re: Left column not working in my tpl_main_page.php

    Your view source indicates that includes/templates/template_default/css/stylesheet.css is being parsed and this is really not a template that is assignable from the admin and you state that you have applied this to your override folder but this template is not being used???

    Have you named it in the template_info.php file?
    Have you enabled it in the admin > tools > template selection?
    Have you reset the sideboxes in admin > tools > layoutboxes controller > reset?

    Get this square so that when you view your page source that the template that you are designing is being the one used and you might see a difference.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Dec 2005
    Posts
    21
    Plugin Contributions
    0

    Default Re: Left column not working in my tpl_main_page.php

    Thanks for your help...yes I have done all the things you said except turn on the layout box for categories!..I guess I was thinking that because the box was showing for the default template that it should also show for my template.

    Thanks a lot!

 

 

Similar Threads

  1. Replies: 0
    Last Post: 21 Jul 2012, 09:48 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. Not working: Customer Authorization: Hide Column Left ?
    By seanzhu in forum Customization from the Admin
    Replies: 2
    Last Post: 7 Sep 2010, 12:00 PM
  4. Left column not showing
    By Nonnumquam in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Oct 2007, 04:24 PM
  5. discard left column on index.php
    By animike in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Oct 2007, 03:44 PM

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