SophieWeb Posted June 22, 2011 Share Posted June 22, 2011 Version osCommerce Online Merchant v2.3.1 I would like to remove the left side bar (categories and such) from my index page only and have it as a landing page with new products. For Example: But i would like the left side bar to be in place on ALL the other pages. Posted in another topic as well: http://www.oscommerce.com/forums/topic/375880-create-a-new-index-page/ "i understand this, but how can i remove the categories sidebar as well. I would like the index page to be like a landing page without the categories and then have the categories sidebar show up on all the other pages. It is not possible to remove the side bar from the template top as i already tried this and it removed it from the entire site. From the index.php you can only customize the 'text_main' area and remove the 'new products' and such. i know creating a new index.php is probably the key, but then i run back into the template top situation? any new ideas on this? " Thanks! Link to comment Share on other sites More sharing options...
Guest Posted June 23, 2011 Share Posted June 23, 2011 easy to do in rc2a, not so much with 2.3.1 Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 23, 2011 Share Posted June 23, 2011 The following will get rid of both right and left columns on the index page only, and make the center full screen. OPEN includes/template_top.php FIND: <div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>"> REPLACE with: <div id="bodyContent" class="grid_<?php echo (!strstr($PHP_SELF,FILENAME_DEFAULT) ? $oscTemplate->getGridContentWidth() : $oscTemplate->getGridContainerWidth()); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') && !strstr($PHP_SELF,FILENAME_DEFAULT) ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>"> OPEN includes/template_bottom.php FIND: if ($oscTemplate->hasBlocks('boxes_column_left')) { BEFORE add: if (!strstr($PHP_SELF,FILENAME_DEFAULT)) { FIND: <?php } AFTER add: } //if (!strstr($PHP_SELF,FILENAME_DEFAULT)) FIND: if ($oscTemplate->hasBlocks('boxes_column_right')) { BEFORE add: if (!strstr($PHP_SELF,FILENAME_DEFAULT)) { FIND: <?php } AFTER add: } //if (!strstr($PHP_SELF,FILENAME_DEFAULT)) Link to comment Share on other sites More sharing options...
SophieWeb Posted June 29, 2011 Author Share Posted June 29, 2011 Yes SLICK_303 This does remove the sidebar for the main page, but also for the main category pages as well. I would like to keep the side bar for the main category pages. And remove the sidebar only from the home page. Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 30, 2011 Share Posted June 30, 2011 you wanted it removed from the 'index page' that is what I have done...... The main cat pages are displayed by the index.php file....You would have to modify the logic statements to check if cPath contains a value, if it doesn't dont display r/l columns, if it does have a value then show columns... Link to comment Share on other sites More sharing options...
SophieWeb Posted June 30, 2011 Author Share Posted June 30, 2011 can you please give me an example of the cpath suggestion? Link to comment Share on other sites More sharing options...
SophieWeb Posted July 1, 2011 Author Share Posted July 1, 2011 never mind i figured out another way using an if else situation. Thanks anyways. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.