Page Alias?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Okkido

Page Alias?

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Page Alias?

Post by calguy1000 »

try the {get_template_vars} plugin.... it should list all of the variables that are available.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Okkido

Re: Page Alias?

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Page Alias?

Post by calguy1000 »

{$page_alias}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Okkido

Re: Page Alias?

Post by Okkido »

Worked perfect, thank you so much!
BadKarma

Re: Page Alias?

Post 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
mahjong

Re: Page Alias?

Post by mahjong »

{$page} works for me.
BadKarma

Re: Page Alias?

Post 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
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Page Alias?

Post 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
Locked

Return to “CMSMS Core”