Skip to content

Instantly share code, notes, and snippets.

@dltj
Created October 25, 2013 18:53
Show Gist options
  • Save dltj/7159908 to your computer and use it in GitHub Desktop.
Save dltj/7159908 to your computer and use it in GitHub Desktop.
/**
* Implements hook_islandora_breadcrumbs_alter();
*
* Removes Islandora top-level breadcrumbs that would send the user astray.
*
*/
function islandora_breadcrumb_fix_islandora_breadcrumbs_alter(&$active_trail, $item) {
dpm('got here');
dpm($active_trail);
foreach ($active_trail as $key => $parent) {
if (isset($parent['href'])) {
if ($parent['href'] === 'islandora') {
unset($active_trail[$key]);
}
if ($parent['href'] === 'islandora/object/davidson:root') {
unset($active_trail[$key]);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment