From 43c9f156472ed490f723ddbeb760619a142aaf05 Mon Sep 17 00:00:00 2001 From: Jake Bentvelzen Date: Wed, 30 Mar 2016 16:46:18 +1100 Subject: [PATCH] Fixed bug where breadcrumb title wouldn't appear if title was blank --- forms/gridfield/GridFieldDetailForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forms/gridfield/GridFieldDetailForm.php b/forms/gridfield/GridFieldDetailForm.php index d70e16a8c..2fe2a41ec 100644 --- a/forms/gridfield/GridFieldDetailForm.php +++ b/forms/gridfield/GridFieldDetailForm.php @@ -680,8 +680,9 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler { $items = $this->popupController->Breadcrumbs($unlinked); if($this->record && $this->record->ID) { + $title = ($this->record->Title) ? $this->record->Title : "#{$this->record->ID}"; $items->push(new ArrayData(array( - 'Title' => $this->record->Title, + 'Title' => $title, 'Link' => $this->Link() ))); } else {