Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How-to: get ez-page id on code?

How-to: get ez-page id on code?

Views: 2,303

Results 1 to 8 of 8
7 Mar 2011, 3:49 AM
#1
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

How-to: get ez-page id on code?

Hi, i wonder what variable or syntax is used to get the id of an ez page, like for example:
if ezpage number=1 then do this command. help please, thanks

7 Mar 2011, 4:52 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: How-to: get ez-page id on code?

/index.php?main_page=page&id=1

hope this helps!

7 Mar 2011, 5:26 AM
#3
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: How-to: get ez-page id on code?

hi, i mean on php conditions like:
if(page id == 1){
codes;
}

is there a global variable ready from zen cart to get that page id == #?

7 Mar 2011, 5:44 AM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: How-to: get ez-page id on code?

I guess I should ask what you are trying to do cause their are several ways:

for example:
if (in_array($ezpage_id,explode(",",'2,5'))) {

codes;
}

7 Mar 2011, 6:09 AM
#5
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: How-to: get ez-page id on code?

ok that's a clue thanks, will try it.
i want some images on my header to appear different on pages.

7 Mar 2011, 3:10 PM
#7
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: How-to: get ez-page id on code?

great!! i'll try this mod, thanks

8 Mar 2011, 6:35 AM
#8
jcwynford avatar

jcwynford

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: How-to: get ez-page id on code?

rbarbour:

I guess I should ask what you are trying to do cause their are several ways:

for example:
if (in_array($ezpage_id,explode(",",'2,5'))) {

codes;
}

thanks, this works for me.
thanks for the mod as well :clap: