Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customized Index Page


SophieWeb

Recommended Posts

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:

32410-osc-b.jpg

 

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...