Forums / Templates, Stylesheets, Page Layout / Removing side columns from main page ONLY

Removing side columns from main page ONLY

Started by meljen on 7 Sep 2012, 7:12 PM · Views: 918

Results 1 to 4 of 4
7 Sep 2012, 7:12 PM
#1
meljen avatar

meljen

Zen Follower

Join Date:
Apr 2012
Posts:
127
Plugin Contributions:
0

Removing side columns from main page ONLY

I am interested in removing the side columns (left & right) from my shop's main page ONLY. I want the columns to remain untouched on all other pages. How do I do this? I figure it has to be a pretty simple solution.

FWIW I did do a search and found this thread:
http://www.zen-cart.com/showthread.php?183875-how-do-I-change-the-home-page-layout/page2&highlight=columns+main+page

But it goes in circles a bit and confused me more than it helped.

...so any replies would be greatly appreciated. :-) Thank you!

edit If it helps, my main page is currently handled through the 'define pages' editor like default. I don't know if that makes a difference or not.

7 Sep 2012, 8:02 PM
#3
meljen avatar

meljen

Zen Follower

Join Date:
Apr 2012
Posts:
127
Plugin Contributions:
0

Re: Removing side columns from main page ONLY

Alright then, in looking at that post & article, would this work?

if ($this_is_home_page) {
$flag_disable_left = true;
$flag_disable_right = true;
}

7 Sep 2012, 10:03 PM
#4
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Re: Removing side columns from main page ONLY

Here's the code (below) I use on one of my demo sites here:

http://www.webdivision.prommart.com/zencart-demo/?template_switch_id=barebones

and I have it at the very top of common/tpl_main_page right after the instructions.

But whether or not it will work will depend in part on your template. Some templates like Estorenow, Bluecart, Apple Zen and Cherry Zen, one doesn't just turn on or off columns, it's a bit more involved than that.

if ($this_is_home_page == true) {
$flag_disable_right = true;
$flag_disable_left = true;
}

Steve
prommart.com