Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Show right column on home page only

Show right column on home page only

Views: 1,348

Results 1 to 5 of 5
11 Aug 2010, 12:42 AM
#1
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Show right column on home page only

I want to show the right column on the home page only. I've read the FAQ page and various forum posts, but it seems everyone else is doing the opposite and hiding the column on the home page. I've tried the suggestions and played around, but I just can't get it working.

Could someone help me out?

Thanks!

11 Aug 2010, 12:51 AM
#2
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Show right column on home page only

Nevermind, figured it out right after I posted :)

In tpl_main_page.php, change:

if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_disable_right = true;
}

to:

if ($this_is_home_page) {
$flag_disable_right = false;
} else {
$flag_disable_right = true;
}

12 Aug 2010, 2:26 AM
#3
john4803 avatar

john4803

New Zenner

Join Date:
Aug 2010
Posts:
31
Plugin Contributions:
0

Re: Show right column on home page only

I think you can do this in the Admin>Config>EZ-Pages Settings>
EZ-Pages Pages to disable right-column and then list the pages. The problem with this is that you have to come up with the page no. for the home page and not sure how that works?

12 Aug 2010, 2:59 AM
#4
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Show right column on home page only

Yes, but I wanted it show on the home page and be disabled on every other page, so I would have had to list everything but the home page, kind of a pain. The solution above works perfectly and is much easier :)

15 Apr 2011, 11:13 PM
#5
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: Show right column on home page only

Danielle:

Yes, but I wanted it show on the home page and be disabled on every other page, so I would have had to list everything but the home page, kind of a pain. The solution above works perfectly and is much easier :)
Perfect thanks Danielle!
Excellent solution to show the right column on homepage only.
Thanks for posting your own solution for others :smile: