71 $qs = getCleanQueryString();
74 trace(
"Breadcrumb url $this->url", 3);
75 $this->qs = preg_replace(
"/_style=\\w+&*/",
"",
$qs);
77 $this->breadcrumbs = $this->
getTrail();
89 $currentSiteMapPage = $this->
findPage();
90 trace(
"Breadcrumbs:: currentSiteMapPage id {$currentSiteMapPage->url}", 3);
92 if(!$currentSiteMapPage)
97 $upTreePages = $this->
walkUpTree($currentSiteMapPage);
131 $upTreePages = array();
132 if(!$currentSiteMapPage)
return $upTreePages;
134 $currPage = clone $currentSiteMapPage;
136 while(isset($currPage))
138 array_push($upTreePages, $currPage);
139 $currPage = $currPage->Parent();
158 $downTreePages = array_reverse($upTreePages);
161 $last = count($downTreePages) - 1;
163 foreach($downTreePages as $downTreePage)
169 $link = ($idx > 0 AND
$this->qs) ?
"$downTreePage->url?{$this->qs}" : $downTreePage->url;
170 $title = $downTreePage->page_title;
171 $breadcrumbs .=
"<a href=\"{$link}\">{$title}</a> »\n";
191 $url =
"/$identifier";
193 $url =
"/{$section->section}/$identifier";
static $overrideCurrentPage
walkUpTree($currentSiteMapPage)
Traverse up the tree through each parent url to find the root.
findPage()
Get the server's url and query the SiteMap table for a match.
getLink($identifier=null)
walkDownTree($upTreePages)
No need to show breadcrumbs if there is just one single node in the tree path.
getTrail()
Gather the breadcrumb trail.
static using()
Import the datamodels, views and manifest for the specified component(s).