Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding content on default index.php content ABOVE the left column


Guest

Recommended Posts

So what would have taken me all of about 2 seconds in rc2a has me beating my head against the wall in 2.3.3...

 

Has anyone put content on the default index page (not a c_path page) that spanned the entire site width (rather than just the width excluding the left column)?

 

I am trying to add content, lets call it a banner, to the entire width of the index - default - page. Currently, I have it in the index.php page but due to the dumb template top inclusion, cannot get it to kick the column left down and take up that real estate. I tried putting it in the header with so if statements around it to only show on the index page but that overlapped it with the header.

 

Has anyone added content in this area? If so, how did you get around the left column?

 

Still absolutely not in love with the 2.3.x line - I miss rc2a

 

Thanks in advance.

Link to comment
Share on other sites

I think I understand what you mean.

 

open catalog/includes/template_top.php

 

and find this code at the bottom of the file

 

<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

 

above it insert:

 

<div class="grid_24">
 <div class="grid_10 alpha"><?php echo '  ' . $breadcrumb->trail(' » '); ?></div>
</div>

 

This displays the breadcrumb starting in the left column and spanning the main content area, change what you need to display.

 

Now this does work on my store and many thanks to @@burt as the idea came from his blog post :thumbsup:

 

Mark

Link to comment
Share on other sites

The whole system is a little clunky now compared to how it used to be.

A good example of another ongoing conversation.

 

In effect, what @@PupStar says is the way I find easiest.

 

Also, consider that you don't have to stay within the the "container" or "grid" system.

Link to comment
Share on other sites

@@rcall

@@burt

 

also just realised is that you will need to play with the grid_10 as well as I have just realised that it only spans '10' obviously and not the entire width.

 

I am still getting used to this dang 960 system and I presume 24 would span the entire width

Link to comment
Share on other sites

<div class="grid_24">

whatever here, grid_24 may or may not need an "alpha" on it

</div>

 

So, in general, looking at R's need;

 

<?php
if ((basename($PHP_SELF) == FILENAME_DEFAULT) && ($category_depth == 'top')) {
?>
<div class="grid_24 alpha"></div>
<?php
}
?>

 

I think that may work [untested], as you woud be checking on PHP_SELF = index.php - and on category_depth (set in index.php)

have this in /includes/template_top.php or header.php - whereever the "banner" should show.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...