It's possible that despite setting "Append the current page to the breadcrumb navigation" being selected, that the current page never gets appended. This occurs if the breadcrumbs variable is empty. The setting implies that the current page should be appended to the breadcrumb. If the breadcrumb is empty, it should still be appended.

Because we check that $variables['breadcrumbs'] is not empty before checking $variables['breadcrumb_current'] is set in theme_delta_blocks_breadcrumb(), it is possible that breadcrumbs is empty, despite the specifying $variables['breadcrumb_current'] = TRUE;

A solution is to check for $variables['breadcrumb_current'] before checking for $variables['breadcrumbs'], allowing $variables['breadcrumb_current'] to append to the $variables['breadcrumbs'] array even if it was previously empty.

Comments

rypit’s picture

Status: Needs work » Needs review
StatusFileSize
new894 bytes

Attached is a patch that moves the check for current before of the check to see if breadcrumbs is empty, allowing the current page to specify a breadcrumb, even if there are no others. This is especially useful for displaying a breadcrumb on a front page.

davemybes’s picture

Actually, the problem is that the setting never gets saved in hook_block_save.

     case 'delta-blocks-breadcrumb':
       variable_set('delta_blocks_breadcrumb_title_hidden', $edit['delta_blocks_breadcrumb_title_hidden']);
+      variable_set('delta_blocks_breadcrumb_current', $edit['delta_blocks_breadcrumb_current']);
\ No newline at end of file
       break;
   }
 }

Ah, just noticed its fixed in 3.0-beta10

davemybes’s picture

Issue summary: View changes

Updated issue summary.