Anyways. Create a new UDT under Extensions >> Tags, and call it 'redirect'. Then paste this code in there.
How do I use it: add {redirect to='page_alias'} into one of your pages, or somewhere intelligently placed in your template (you should have an if statement around this, or you'll get some nasty redirection loops).
Code: Select all
if( isset( $params['to'] ) )
{
global $gCms;
$manager =& $gCms->GetHierarchyManager();
$node =& $manager->sureGetNodeByAlias($params['to']);
$content =& $node->GetContent();
if (isset($content))
{
if ($content->GetURL() != '')
{
redirect($content->GetURL());
}
}
}