Page 1 of 1

Page id, alias and parent variables?

Posted: Wed Apr 01, 2009 11:17 am
by Oskar Rough
Hi,

I've tried searching around but couldn't find it anywhere. How can I print the page id, it's alias and hopefully the same two of the current page's parent? I have tried $gCms->variables['page_name'] but without any luck.

All this is related to my quest to avoid multiple templates =)

Thanks!

Re: Page id, alias and parent variables?

Posted: Wed Apr 01, 2009 12:07 pm
by alby
Oskar wrote: I've tried searching around but couldn't find it anywhere. How can I print the page id, it's alias and hopefully the same two of the current page's parent? I have tried $gCms->variables['page_name'] but without any luck.
You don't say where: page template or menu template

Alby

Re: Page id, alias and parent variables?

Posted: Wed Apr 01, 2009 1:43 pm
by Oskar Rough
alby wrote: You don't say where: page template or menu template
Alby
Sorry, it's the page template. And using the newest 1.5.3.

Re: Page id, alias and parent variables?

Posted: Wed Apr 01, 2009 2:23 pm
by alby
Oskar wrote:
alby wrote: You don't say where: page template or menu template
Alby
Sorry, it's the page template. And using the newest 1.5.3.
Then:
page id: $content_id
alias: $page_alias
parent: you must use CGSimpleSmarty or build a UDT

Alby