Simple, yet sometimes useful (for example to provide css styling dependent on currently viewed page) tag. Maybe used standalone or put into user defined tags:
(file function.pagealias.php)
variables['pageinfo'];
$config = &$gCms->GetConfig();
if (isset($pageinfo) && $pageinfo->content_id == -1)
{
#We've a custom error message... set a current timestamp
return "404 Error";
}
else
{
$result = cms_htmlentities($pageinfo->content_alias);
if (!(isset($config["use_smarty_php_tags"]) && $config["use_smarty_php_tags"] == true))
{
$result = ereg_replace("\{\/?php\}", "", $result);
}
return $result;
}
}
function smarty_cms_help_function_pagealias() {
?>
What does this do?
Prints the alias of the page.
How do I use it?
Just insert the tag into your template/page like: {pagealias}
What parameters does it take?
None at this time.
Alternation: Mateusz Papiernik<mati@maticomp.net>
Author: Ted Kulp<tedkulp@users.sf.net>
Version: 1.0
Change History:
Displays page alias instead of title.
{pagealias} tag
Re: {pagealias} tag
Oh damn!
You're right. It's too late for me to be working
Simpliest solutions don't come to my mind and I have to smash through open doors...

