e.g. www.domain.com/section/subsection/page.html
I've had a look at the menu manager code - but it is way beyond me

Any ideas? I think this would be a really nice feature, especially if we could get it into a Google stiemap.
Russ
Code: Select all
function clean_url($my_ID) {
global $gCms;
global $config;
$thispage = $page;
$thispage = $my_ID;
$trail = "";
$delimiter = "/";
$allcontent = array();
$onecontent = ContentManager::LoadContentFromId($thispage, false);
if ($onecontent !== FALSE)
{
array_push($allcontent, $onecontent);
while ($onecontent->ParentId() > 0)
{
$onecontent = ContentManager::LoadContentFromId($onecontent->ParentId(), false);
if (isset($params['root']))
{
if (strtolower($onecontent->Alias()) != strtolower($params['root']))
{
array_push($allcontent, $onecontent);
}
}
else
{
array_push($allcontent, $onecontent);
}
}
$first=1;
$skip=0;
while ($onecontent = array_pop($allcontent))
{
if ($onecontent->HasProperty('target') && $onecontent->GetPropertyValue('target') != '') {
$trail = $onecontent->getURL();
$skip=1;
continue;
}
if($first) {
$trail = $onecontent->getURL();
$strip = count_chars($config["page_extension"]);
$trail = substr($trail, 0, -5);
$trail .= $delimiter;
$first=0;
} else {
$trail .= $onecontent->MenuText() . $delimiter;
}
}
if ($skip==0) {
$trail = substr($trail, 0, -1);
$trail .= $config["page_extension"];
}
return $trail;
}
}
Code: Select all
function & FillNode(&$content, &$node, &$nodelist, &$gCms, &$count, &$prevdepth, $origdepth)
Code: Select all
$onenode->CleanUrl = clean_url($content->Id());
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*/)?([a-zA-Z0-9\.]+)\.html$ index.php?page=$2 [QSA]
Code: Select all
$trail .= $onecontent->MenuText() . $delimiter;
Code: Select all
$trail .= $onecontent->Alias() . $delimiter;
Code: Select all
function makeHierURL( $content, $ext='html' ) {
$path='/'.$content->Alias();
$content = ContentManager::LoadContentFromId( $content->ParentId() );
while($content) {
$path='/'.$content->Alias().$path;
$content = ContentManager::LoadContentFromId( $content->ParentId() );
};
return("${path}.{$ext}");
}
Code: Select all
$menu .= "<li><a href=\"".$onecontent->GetURL()."\"";
Code: Select all
$menu .= "<li><a href=\"".getFolderizedSitemapURL($onecontent)."\"";
Code: Select all
RewriteEngine On
# The URI exists as a file, so let Apache serve it from the filesysterm
RewriteCond /var/www/mysite%{REQUEST_URI} -f
RewriteRule ^(.+)$ $1 [QSA,L]
# The URI doesn't exist as a file, and it ends in .html, so send it to the path resolver
RewriteCond /var/www/mysite%{REQUEST_URI} !-f
RewriteRule ^(.+)(\.html)?$ /index.php?the_uri=$1 [QSA,L]