Zen Cart Logo
Forums / Basic Configuration / Moving Sideboxes from Right to Left Column for Different pages

Moving Sideboxes from Right to Left Column for Different pages

Locked

Views: 2,742

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
9 Feb 2009, 11:31 PM
#1
jamana avatar

jamana

New Zenner

Join Date:
Sep 2008
Posts:
9
Plugin Contributions:
0

Moving Sideboxes from Right to Left Column for Different pages

Hi,

I've been looking in the forum for a month now, getting ready to go live, and so am posting my question. I'm on 1.3.8a, Php 5.2.8 (Zend: 2.2.0) and wondering how one can have some sideboxes on the right on the home page, then move them to the left for the rest of the site.

Layout Box controller only gives me one choice or the other.

Right now, the sideboxes on the right make sense for the home page, but disappear because I've disabled the right column in most other pages, but still want them to be accessible.

Is this possible?

Thanks so much for your time,

Jamana
https://www.skystonezencart.com (development site)

9 Feb 2009, 11:46 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Moving Sideboxes from Right to Left Column for Different pages

Not without much in the way of custom code

10 Feb 2009, 3:42 AM
#3
jamana avatar

jamana

New Zenner

Join Date:
Sep 2008
Posts:
9
Plugin Contributions:
0

Re: Moving Sideboxes from Right to Left Column for Different pages

Thank you so much for your reply, very much appreciated.

Jamana

10 Feb 2009, 4:09 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving Sideboxes from Right to Left Column for Different pages

If you make a page-specific copy of /includes/templates/your_template/common/tpl_main_page.php, you can move the #navColumnTwo code up to display within #navColumnOne, only for the home page. If memory serves, you would put it in /includes/templates/your_template/index_home/tpl_main_page.php, or possibly /includes/templates/your_template/common/index_home/tpl_main_page.php. I'd have to go look up the right format.

10 Feb 2009, 4:22 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving Sideboxes from Right to Left Column for Different pages

From comments at top of tpl_main_page.php:

    • example: to override the privacy page<br />
    • make a directory /templates/my_template/privacy<br />
    • copy /templates/template_default/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br />

So yes, /includes/templates/your_template/index_home/tpl_main_page.php should be it.

1 Oct 2009, 2:32 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Moving Sideboxes from Right to Left Column for Different pages

Update: "index_home" is not used for the home page; that and all other index pages are named "index", so there is no way of distinguishing the home page with the page-name subfolder system.
This is obviously a potential problem, and ought to be changed, but the change would be deep in the core code.

You would need to customize the basic template copy of tpl_main_page.php with ```php
if($this_is_home_page) {
//do homepage stuff
}else{
//do standard stuff
}

to execute one thing on the home page and another on other pages.