Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Turn off right column in home page only

Turn off right column in home page only

Locked

Started by kiwibrian on 22 Jul 2008, 7:33 PM · Views: 2,288

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

Post #1 by 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.

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

Post #2 by fairestcape

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: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

Post #4 by fairestcape

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

Post #5 by website_rob

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.

The learning is in the doing.

Potent Products

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

kiwibrian

New Zenner

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

Post #6 by 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.

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

drbyte

Sensei

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

Post #7 by drbyte

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

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

kiwibrian

New Zenner

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

Post #8 by kiwibrian

Thanks DB for the clarification.