[Nextcms-commits] CVS: nextcms/extensions location.php,NONE,1.1
Status: Alpha
Brought to you by:
andrejb
|
From: Andrej B. <an...@us...> - 2002-07-14 16:39:27
|
Update of /cvsroot/nextcms/nextcms/extensions
In directory usw-pr-cvs1:/tmp/cvs-serv11043
Added Files:
location.php
Log Message:
* added location
--- NEW FILE: location.php ---
<?php
class location extends Extension {
function getCode() {
$site_pagetree = array_reverse($this->page->site->xmltree->getAncestorOrSelfLimited($this->pagenode_path, "/site[1]/pages[1]", "page"));
$prechars = "";
$location = "";
foreach ($site_pagetree as $entry) {
$nodeatt = &$this->page->site->xmltree->getAttributes($entry);
$docfile = $this->page->site->getVirtualUrlByPath($entry);
$docname = $nodeatt["name"];
$location .= $prechars . "<a href=\"$docfile\" class=\"location\">$docname</a>";
$prechars = " > ";
}
if (!empty($location)) return $location;
return " ";
}
}
?>
|