Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / PHP code to get Columns off of EZ pages

PHP code to get Columns off of EZ pages

Views: 693

Results 1 to 5 of 5
17 Dec 2012, 7:18 PM
#1
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

PHP code to get Columns off of EZ pages

Hey Everyone,
i'm trying to come up with some PHP code to turn both columns off when the EZ pages are on.
here's the configuration i have right now

home page - Left Col. Off, Right Col. on
all others - Left Col. On, Right Col. off

the PHP code i have which is working so far is this, but will not work once the EZ pages are launched.

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

i like that variable $this_is_home_page a lot! is there one such variable for EZ pages?, hope so

17 Dec 2012, 8:23 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,096
Plugin Contributions:
56

Re: PHP code to get Columns off of EZ pages

The main content being displayed is an ez-page ```
if ($_GET['main_page'] == 'page') { ez-page stuff here }

17 Dec 2012, 9:13 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: PHP code to get Columns off of EZ pages

You can switch columns on and off for ezpages by their SETTINGS in Admin Panel

Admin >>> Configuration >>> EZPages Settings...

No need to code this

17 Dec 2012, 9:16 PM
#4
tcarden avatar

tcarden

Zen Follower

Join Date:
Oct 2012
Posts:
282
Plugin Contributions:
0

Re: PHP code to get Columns off of EZ pages

thanks much,

18 Dec 2012, 3:21 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: PHP code to get Columns off of EZ pages

Note that the EZ-Pages Settings line is for individual ez-pages; you can use it to enumerate all of your ez-page ids, but if you add new ones, you will have to list them here also.

For global ez-page use, the tpl_main_page.php solution is easier and requires no maintenance.