Ken2k7
So here what i have done as you suggested:
about.php
<?php
$obj['smarty']->assign('file_inc', 'about.tpl');
$obj['smarty']->assign('url', '/about.php');
?>
In tpl
<p><a href="{$url}">What is domain.com</a></p>
Unfortunately that did not work.
I've located the following code that talks about url's and all maybe that will help:
// Get the document
$document = $obj['tree']->get_item($obj['url']->link);
if (!$document)
{
header("HTTP/1.1 404");
$obj['smarty']->assign('file_inc', 'error404.tpl');
$obj['smarty']->display('error404.tpl');
exit;
}
if ( $document['isdir'] || $document['pid']!=0 )
{
if ( $document['pid']!=0 )
{
$parent = $obj['tree']->get_item($document['pid']);
}
else
{
$parent = $document;
}
$parent['items'] = $obj['tree']->get_childrens($parent['id']);
$obj['smarty']->assign('document_parent', $parent);
}
//$path = $obj['tree']->get_path($document['id']);
$path = array();
$path2 = $path;
$path2[] = $document;
$document_not_found = 0;
if($document['public']) {
foreach($handles as $h)
{
if((int)$h['id'] == (int)$document['handle']) {
require($CFG['path']['process'] . $h['script']);
}
}
}
else
{
header("Location: /");
exit();
}
// Checking is not whether to go to the first child element
if($document['is_gochild']) {
$childs = $obj['tree']->get_childrens($document['id']);
if (is_array($childs))
{
header("Location: /" . $childs[0]['alias'] . ".html");
exit;
}
}
// Smarty pass some of the variables
$obj['smarty']->assign('var', $VAR);
$obj['smarty']->assign('cfg', $CFG);
$obj['smarty']->assign('handles', $handles);
$obj['smarty']->assign('document', $document);
$obj['smarty']->assign('path', $path);
$obj['smarty']->assign('path2', $path2);
$obj['smarty']->assign('url', $obj['url']->url);