Drupal: Current Page Title in a Breadcrumb
This article contains a quick solution of how to display title of a current document in a breadcrumb. A title haven’t contain links.
Solution:
Redefine output of $breadcrumb in a theme
You should add the following code in template.php file of a current theme:
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
$breadcrumb[] = drupal_get_title();
return ”. implode(‘ > ‘, $breadcrumb);
}
}
A short tips for Taxonomy Breadcrumb users:
- Disable output of term name in a breadcrumb in the module. See “Show current term in breadcrumb trail?” parameter on /admin/settings/taxonomy-breadcrumb (Drupal 5.x) page
- Include the necessary node types (they will be processed by the module) to “Advanced settings”.
- Replace “Main” to …