Using $Breadcrumbs in a template will generate a trail of links with the page title as link name. I think it would be better to have the navigation label as link name (after all, it is navigation, and in my case some pages have rather long page titles). If I understand it correctly, the breadcrumbs get generated by a public function in SiteTree.php:
public function Breadcrumbs($maxDepth = 20, $unlinked = false,
$stopAtPageType = false) {
$page = $this;
$parts = array();
$i = 0;
while(($page && (sizeof($parts) < $maxDepth)) ||
($stopAtPageType && $page->ClassName != $stopAtPageType)) {
if($page->ShowInMenus || ($page->ID == $this->ID)) {
if($page->URLSegment == 'home') {
$hasHome = true;
}
$parts[] = (($page->ID == $this->ID) || $unlinked)
? Convert::raw2xml($page->Title)
: ("<a href=\"" . $page->Link() . "\">" . Convert::raw2xml($page->Title) . "</a>");
}
$page = $page->Parent;
}
return implode(" » ", array_reverse($parts));
}
So, if I replace 'Title' with 'MenuTitle' it would do what I want, right? Can I safely do this, or are there other functions in the CMS that depend on the fact that the breadcrumb function uses 'Title'?
Thanks in advance!