Forums / Templates, Stylesheets, Page Layout / Left column not working in my tpl_main_page.php

Left column not working in my tpl_main_page.php

Locked

Views: 1,315

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
27 Mar 2007, 3:02 AM
#1
davidf avatar

davidf

New Zenner

Join Date:
Dec 2005
Posts:
21
Plugin Contributions:
0

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> | <a id=link href="../gallery/index.php">Carpet
            Gallery</a> | <a id=link href="../carpet-info.htm">Carpet
            Info</a> | <a id=link href="../service-info.htm">Service
            Info</a> | <a id=link href="../about-us.htm">About Us</a> | <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>
27 Mar 2007, 6:37 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

2 Apr 2007, 2:19 AM
#3
davidf avatar

davidf

New Zenner

Join Date:
Dec 2005
Posts:
21
Plugin Contributions:
0

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!