/** * CMS-specific functionality: Passes through navigation breadcrumbs * to the template, and includes the currently edited record (if any). * see {@link LeftAndMain->Breadcrumbs()} for details. * * @param boolean $unlinked * @return ArrayData */ public function Breadcrumbs($unlinked = false) { if (!$this->popupController->hasMethod('Breadcrumbs')) { return; } $items = $this->popupController->Breadcrumbs($unlinked); if ($this->record && $this->record->ID) { $items->push(new ArrayData(array('Title' => $this->record->Title, 'Link' => $this->Link()))); } else { $items->push(new ArrayData(array('Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->i18n_singular_name()), 'Link' => false))); } return $items; }