Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tutorial for putting the left and right columns on the same side of the page?


Guest

Recommended Posts

I have a client that has had me design his OSC theme, and everything has come out fine, except that he would like the home page to have both the right and left column together on the right side of the page, with the main content on the left. Like this:

 

 

-------- HEADER BANNER ------

-------------- MENU -------------

XXXXXXXXXXX XXXX XXXX

XXCONTENTXX XXXX XXXX

XXXXXXXXXXX XLCX XRCX

XXXXXXXXXXX XXXX XXXX

XXXXXXXXXXX XXXX XXXX

 

Just for the home page. I'm not a PHP expert here and can't figure out what to change in the theme index.php file to make that happen. Or without having it be like that on the rest of the pages. If there is a pre-existing tutorial or anyone has anything they could link me to for this, I'd really appreciate it.

Link to comment
Share on other sites

I have a client that has had me design his OSC theme, and everything has come out fine, except that he would like the home page to have both the right and left column together on the right side of the page, with the main content on the left. Like this:

-------- HEADER BANNER ------

-------------- MENU -------------

XXXXXXXXXXX XXXX XXXX

XXCONTENTXX XXXX XXXX

XXXXXXXXXXX XLCX XRCX

XXXXXXXXXXX XXXX XXXX

XXXXXXXXXXX XXXX XXXX

 

Just for the home page. I'm not a PHP expert here and can't figure out what to change in the theme index.php file to make that happen. Or without having it be like that on the rest of the pages. If there is a pre-existing tutorial or anyone has anything they could link me to for this, I'd really appreciate it.

 

Each page (including the index page) is made up of on main table which has one row and three columns. In the default installation the left column is the left box, center is main content, right column is right box. Now, you can change things around. For instance I decided to get rid of the left column entirely and just have all my boxes on the right column with the main page content on the left side of the screen.

 

Now, all you have to do is change the order of your columns to main content, left column and right column (i.e. just swap over the main content and left column). The left column code starts with:

 

<td width="<?php echo BOX_WIDTH; ?>" valign="top">

 

and is the first <td> tag. The main content column is the first <td> after:

 

<!-- body_text //-->

 

It is a little fiddly getting the end of the main content column simply because there are ALOT of nested tables. So just look for:

 

<!-- body_text_eof //-->

 

and you should see where the <td> ends.

 

Hope this helps,

 

David

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...