function farm_ui_entity_set_breadcrumb in farmOS 7
Set the breadcrumb for an entity view page. This should be called in hook_entity_view().
Parameters
$entity_type: The entity type.
$bundle: The entity bundle.
See also
1 call to farm_ui_entity_set_breadcrumb()
- farm_ui_entity_view in modules/
farm/ farm_ui/ farm_ui.module - Implements hook_entity_view().
File
- modules/
farm/ farm_ui/ farm_ui.breadcrumb.inc, line 39
Code
function farm_ui_entity_set_breadcrumb($entity_type, $bundle) {
// Get the breadcrumb from our helper function.
$breadcrumb = farm_ui_entity_type_breadcrumb($entity_type, $bundle);
// Add base breadcrumb items to the front.
$front = variable_get('site_frontpage', 'farm');
$front_item = menu_get_item($front);
$base = array(
l(t('Home'), '<front>'),
l($front_item['title'], $front),
);
$breadcrumb = array_merge($base, $breadcrumb);
// Set the breadcrumb.
drupal_set_breadcrumb($breadcrumb);
}