mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
FEATURE: added $PageTitle output for nicer bookmarked urls
This commit is contained in:
parent
9bd43ae7ad
commit
24f1b13233
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user