Skip to content

Instantly share code, notes, and snippets.

@zachharkey
Created March 10, 2010 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachharkey/327561 to your computer and use it in GitHub Desktop.
Save zachharkey/327561 to your computer and use it in GitHub Desktop.
Return a themed breadcrumb trail (Drupal 6)
<?php
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function themename_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
$title = drupal_get_title();
if (!empty($title)) {
$breadcrumb[] = '<span class="active">'. $title .'</span>';
}
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment