Forums / General Questions / how to ez pages id for use in php code

how to ez pages id for use in php code

Locked

Views: 530

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
12 May 2010, 11:46 AM
#1
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

how to ez pages id for use in php code

I need to be able to assign a specific css class on each ez page. So I need to pull the id number to use in my if statement. I see that the $current_page_base is page so is there something already usable in zen to pull the id number off the string?

The code will go something like this:

if ($current_page_base=='page') {
what is the id number?
}

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

12 May 2010, 12:04 PM
#2
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: how to ez pages id for use in php code

really bright!

The answer is

$pageid = $_GET['id'];

if ($pageid ==1) $class='sky';

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo