diff --git a/vanilla/applications/vanilla/controllers/class.draftscontroller.php b/vanilla/applications/vanilla/controllers/class.draftscontroller.php index 108b02f..ef42a7c 100644 --- a/vanilla/applications/vanilla/controllers/class.draftscontroller.php +++ b/vanilla/applications/vanilla/controllers/class.draftscontroller.php @@ -32,6 +32,7 @@ public function index($offset = '0') { $this->addJsFile('jquery.gardenmorepager.js'); $this->addJsFile('discussions.js'); $this->title(t('My Drafts')); + $this->setData('Breadcrumbs', [['Name' => t('My Drafts'), 'Url' => '/drafts']]); // Validate $Offset if (!is_numeric($offset) || $offset < 0) { diff --git a/vanilla/library/SmartyPlugins/function.breadcrumbs.php b/vanilla/library/SmartyPlugins/function.breadcrumbs.php index 7583389..ceae812 100644 --- a/vanilla/library/SmartyPlugins/function.breadcrumbs.php +++ b/vanilla/library/SmartyPlugins/function.breadcrumbs.php @@ -23,6 +23,5 @@ function smarty_function_breadcrumbs($params, &$smarty) { $options = arrayTranslate($params, ['homeurl' => 'HomeUrl', 'hidelast' => 'HideLast']); - // Don't show a home link by default - return Gdn_Theme::breadcrumbs($breadcrumbs, val('homelink', $params, false), $options); + return Gdn_Theme::breadcrumbs($breadcrumbs, val('homelink', $params, true), $options); } diff --git a/vanilla/library/core/class.theme.php b/vanilla/library/core/class.theme.php index ae95016..d66a7d4 100644 --- a/vanilla/library/core/class.theme.php +++ b/vanilla/library/core/class.theme.php @@ -57,7 +57,7 @@ public static function assetEnd() { * @param array $options * @return string */ - public static function breadcrumbs($data, $homeLink = false, $options = []) { + public static function breadcrumbs($data, $homeLink = true, $options = []) { $format = ''; $result = ''; @@ -87,11 +87,6 @@ public static function breadcrumbs($data, $homeLink = false, $options = []) { $defaultRoute = ltrim(val('Destination', Gdn::router()->getRoute('DefaultController'), ''), '/'); - // FIX: Don't show current page - if(count($data) <= 1) { - return ''; - } - $count = 0; $dataCount = 0; $homeLinkFound = false;