zzelinski | Shared With: Everyone - Aug 05 2008 | drupal
I think I faved this already...but here's the code snippet that will give you the title of the page you're on in drupal breadcrumbs when pasted into template.php in theme.
Quoted: <?php
/*
phptemplate_breadcrumb($breadcrumb) modification
File: template.php
Use: Hide breadcrumb trails with only 1 crumb, regardless of crumb name ("home" is)
a popular single-crumb that people like to have removed in some templates.
Through: PHPTemplate function override
Benefits: Does not involve extra code in separate view.
*/
function phptemplate_breadcrumb($breadcrumb) {
$home = variable_get('site_name', 'drupal');
$sep = ' » ';
// Check if breadcrumb has more than 1 element.
// Options: Change to the number of elements/crumbs a breadcrumb needs to be visible.
if (count($breadcrumb) > 1) {
$breadcrumb[0] = l(t($home), '');
/*
Optional: Include page title in breadcrumb.drupal_get_title() !== ''
Check if title blank, if that is the case, we cannot include trailing page name.
strstr(end($breadcrumb),drupal_get_title()) == FALSE
Some modules will make it so path or breadcrumb will involve duplication of
title and node name (such as in the Events module) to remove this, simply
take out && strstr(end($breadcrumb),drupal_get_title()) == FALSEUse: Simply uncomment the if structure below (3 lines).
Special Use: If you wish to use this regardless of elements/crumbs in a breadcrumb
simply cut/paste the statements inside the "if (count($breadcrumb) > 1)" outside
of the structure, and delete the extranneous structure.
*/
if ( (drupal_get_title() !== '') && (strstr(end($breadcrumb),drupal_get_title()) ) == FALSE) {
$breadcrumb[] = t(drupal_get_title(), '');
}return implode($sep, $breadcrumb);
} else {
// Would only show a single element/crumb (or none), so return nothing.
// You can remove this statement.
}
}
?>ShareViewed: 3 Times
zzelinski | Shared With: Everyone - Aug 04 2008 | drupal
This is another discussion of how to input some php to get the breadcrumb to display the current page.
ShareViewed: 3 Times
zzelinski | Shared With: Everyone - Jul 29 2008 | go, drupal
StartPad site breadcrumbs don't show the current page as of now. This might fix it, if I can figure out what it all means...
ShareViewed: 50 Times
zzelinski | Shared With: Everyone - Jul 09 2008 | drupal
zzelinski | Shared With: Everyone - Jul 03 2008 | drupal, upgradeShareViewed: 2 Times
zzelinski | Shared With: Everyone - Jun 30 2008 | drupal, video
zzelinski | Shared With: Everyone - Jun 27 2008 | drupal, mediaShareViewed: 1 Time
zzelinski | Shared With: Everyone - Jun 27 2008 | video, drupal
zzelinski | Shared With: Everyone - Jun 27 2008 | drupalShareViewed: 5 Times
zzelinski | Shared With: Everyone - Jun 25 2008 | drupal, monitor, modules
Built into 6.x core, this is useful for 5.x -- though we run an older version of drupal (5.3 instead of 5.7) so this would just be an annoying red message all the time.
ShareViewed: 1 Time

Send Zachary a friend request or a personal message instead.