mathius Posted August 9, 2008 Posted August 9, 2008 Is this possible? I want my index page to show the right column, but want to remove it from the product listing pages. Im guessing this is done in index.php the only code I can find is: <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> Thanks
Guest Posted August 9, 2008 Posted August 9, 2008 Try this. Change this code <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> to <?php if ( ($category_depth != 'products') && (!isset($HTTP_GET_VARS['manufacturers_id'])) ) { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?>
mathius Posted August 9, 2008 Author Posted August 9, 2008 Try this. Change this code <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> to <?php if ( ($category_depth != 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?> Your a legend! works perfectly thanks very much
Guest Posted August 9, 2008 Posted August 9, 2008 Just so you know I made a change to that. It wasn't taking it out when selecting a manufacturer. The new way is. The change is above.
mathius Posted August 9, 2008 Author Posted August 9, 2008 Just so you know I made a change to that. It wasn't taking it out when selecting a manufacturer. The new way is. The change is above. Ok thanks I've updated it. Im a noob when it comes to php, are you able to briefly explain what that code is doing please?
Guest Posted August 9, 2008 Posted August 9, 2008 The index page is broken down into different parts. 1. when you first enter the index page defined as top 2. When click on a category that has no products but has subcategories defined as nested 3. When you click on category that has products or select a manufacturer from the drop dow list defined as products. That code is basicly saying if the index page is not defined as having products and a manufacturer has not been selected then show the right column.
mathius Posted August 9, 2008 Author Posted August 9, 2008 The index page is broken down into different parts. 1. when you first enter the index page defined as top 2. When click on a category that has no products but has subcategories defined as nested 3. When you click on category that has products or select a manufacturer from the drop dow list defined as products. That code is basicly saying if the index page is not defined as having products and a manufacturer has not been selected then show the right column. ah ok thanks, so what would that code be if you were to remove the right column from the nested pages aswell?
Guest Posted August 9, 2008 Posted August 9, 2008 If I understand you correctly you only want the right column to appear when you first enter the index page. Once you click on any category, subcategory or select a manufacturer you do not want to show the right column. If thats right try this. <?php if ( ($category_depth == 'top') && (!isset($HTTP_GET_VARS['manufacturers_id'])) ) { ?> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> <?php } ?>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.