Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Turn off right column in home page only

Turn off right column in home page only

Locked

Views: 2,282

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
22 Jul 2008, 7:33 PM
#1
kiwibrian avatar

kiwibrian

New Zenner

Join Date:
Nov 2003
Posts:
70
Plugin Contributions:
0

Turn off right column in home page only

I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
if ($this_is_home_page) {
$flag_disable_right = true;
}
However I am unclear exactly where in the file this should be inserted.
Can someone please verify that I am correct, and clarify my confusion.

23 Jul 2008, 3:09 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Turn off right column in home page only

Rather try this:

Find the line (Around 42 / 43)

// the following IF statement can be duplicated/modified as needed to set additional flags
  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;
  }

... and insert index where shown...

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'index')) ) {
    $flag_disable_right = true;
  }

Later, if you want to, you can disable right column for more pages in this way.

23 Jul 2008, 3:18 PM
#3
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Turn off right column in home page only

:oops: Suggestion above does not work for home page only... Sorry...

Will get back to you.

23 Jul 2008, 3:22 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Turn off right column in home page only

Just paste it under this, as shown below:-

// the following IF statement can be duplicated/modified as needed to set additional flags
  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;
  }

if ($this_is_home_page) {
$flag_disable_right = true;
}
23 Jul 2008, 3:48 PM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Turn off right column in home page only

KiwiBrian:

I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
if ($this_is_home_page) {
$flag_disable_right = true;
}
However I am unclear exactly where in the file this should be inserted.
Can someone please verify that I am correct, and clarify my confusion.

Your code is correct and the file would go here:

includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

If you do not already have a 'common' dir. then you can create one.

23 Jul 2008, 6:46 PM
#6
kiwibrian avatar

kiwibrian

New Zenner

Join Date:
Nov 2003
Posts:
70
Plugin Contributions:
0

Re: Turn off right column in home page only

Thanks to you both for the help.
Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.

23 Jul 2008, 7:06 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Turn off right column in home page only

KiwiBrian:

Thanks to you both for the help.
Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.

Same place as fairestcape was suggesting

23 Jul 2008, 7:18 PM
#8
kiwibrian avatar

kiwibrian

New Zenner

Join Date:
Nov 2003
Posts:
70
Plugin Contributions:
0

Re: Turn off right column in home page only

Thanks DB for the clarification.