Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions vanilla/library/SmartyPlugins/function.breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
7 changes: 1 addition & 6 deletions vanilla/library/core/class.theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<a href="{Url,html}" itemprop="url"><span itemprop="title">{Name,html}</span></a>';

$result = '';
Expand Down Expand Up @@ -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;
Expand Down