Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Problem with switching columns on/off

Problem with switching columns on/off

Locked

Views: 1,031

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
28 Aug 2008, 3:09 AM
#1
ajhb avatar

ajhb

New Zenner

Join Date:
Jul 2008
Posts:
59
Plugin Contributions:
0

Problem with switching columns on/off

Hi,

I'm having trouble with switching columns on/off on the home page and category lists. I have added the code if tpl_main_page file (see below) to switch off columns for the home page and it works fine, BUT...it also switches them off on the category lists which I don't want. Not too hot with PHP so not sure how to add the extra code to ensure that it is only switched off for the home page.

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

28 Aug 2008, 3:29 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Problem with switching columns on/off

The easiest way to affect the home page is to use```php
if ($this_is_home_page) {
$flag_disable_left = true;
$flag_disable_right = true;
}

28 Aug 2008, 3:47 AM
#3
ajhb avatar

ajhb

New Zenner

Join Date:
Jul 2008
Posts:
59
Plugin Contributions:
0

Re: Problem with switching columns on/off

Worked perfectly - thank you Glenn, much appreciated