FEATURE: added $PageTitle output for nicer bookmarked urls

This commit is contained in:
Will Rossiter 2011-01-13 20:34:55 +00:00
parent 9bd43ae7ad
commit 24f1b13233

View File

@ -382,7 +382,7 @@ class DocumentationViewer extends Controller {
$page->setEntity($module);
$page->setLang($this->Lang);
$page->setVersion($this->Version);
return $page;
}
@ -499,10 +499,6 @@ class DocumentationViewer extends Controller {
$output = new DataObjectSet();
// $output->push(new ArrayData(array(
// 'Title' => ($this->Version) ? $this->Version : _t('DocumentationViewer.DOCUMENTATION', 'Documentation'),
// 'Link' => $this->Link()
// )));
if($pages) {
$path = array();
@ -522,6 +518,25 @@ class DocumentationViewer extends Controller {
return $output;
}
/**
* Generate a string for the title tag in the URL.
*
* @return String
*/
function getPageTitle() {
if($pages = $this->getBreadcrumbs()) {
$output = "";
foreach($pages as $page) {
$output = $page->Title .' | '. $output;
}
return $output;
}
return false;
}
/**
* Return the base link to this documentation location
*