Page 1 of 1

Page Alias?

Posted: Sun Jul 30, 2006 5:58 pm
by Okkido
Hey there,

Is there any tag or possible in some way to print the "page alias" in the html code?

I want each page to print the page alias as a class in the body-tag.
like this:
I want to use something simple as {title} like but with the page alias instead of the title.

Is that possible?

thanks

Re: Page Alias?

Posted: Sun Jul 30, 2006 6:04 pm
by calguy1000
try the {get_template_vars} plugin.... it should list all of the variables that are available.

Re: Page Alias?

Posted: Sun Jul 30, 2006 6:32 pm
by Okkido
That one prints:
SCRIPT_NAME = /site/index.php
app_name = CMS
sitename = Site Name
lang = sv_SE
encoding = UTF-8
content_id = 51
page = foretaget
page_id = foretaget
page_name = foretaget
page_alias = foretaget
position = 00002
friendly_position = 2
I want to get the information from either page, page_id, page_name or page_alias (the ones that prints "foretaget").
But how should i do that?

Re: Page Alias?

Posted: Sun Jul 30, 2006 6:45 pm
by calguy1000
{$page_alias}

Re: Page Alias?

Posted: Sun Jul 30, 2006 7:02 pm
by Okkido
Worked perfect, thank you so much!

Re: Page Alias?

Posted: Thu Aug 24, 2006 10:22 pm
by BadKarma
calguy1000 wrote: {$page_alias}
Hi guys,

I'm thinking of using different images in my header depending on which page it is. So I'm trying to find a way to use the page_alias in the html code of my template.

I tried the {$page_alias} mentioned in this thread, but I can't make it work.

I put the tag above my {content}, but nothing seems to change. It is like the tag returns an empty string or something.

Does anyone have an idea what I can change to make it work. I'm running out of idea's here...  ???

Thanks

Re: Page Alias?

Posted: Thu Aug 24, 2006 11:09 pm
by mahjong
{$page} works for me.

Re: Page Alias?

Posted: Fri Aug 25, 2006 2:46 pm
by BadKarma
mahjong wrote: {$page} works for me.
I've tried the {$page} tag which works for me.

Still I don't get why {$page_alias} doesn't work.  :-\

Ah well... I can change my template the way I want.  8)

Thanks Mahjong

Re: Page Alias?

Posted: Fri Aug 25, 2006 4:35 pm
by tsw
didnt check but  I think that {$page_alias} gets initialized only after {content} is called... it would explain why it works in content but not in template...

hope this clarifies