function custom_breadcrumbs_node_view in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 7 custom_breadcrumbs.module \custom_breadcrumbs_node_view()
Implements hook_node_view().
File
- ./
custom_breadcrumbs.module, line 221 - Main file for the Custom breadcrumbs.
Code
function custom_breadcrumbs_node_view($node, $build_mode) {
if ($build_mode == 'full') {
// Check for breadcrumb for this node type.
global $language;
$languages = array(
'language' => $language->language,
'all' => '',
);
$breadcrumbs = custom_breadcrumbs_load_breadcrumbs('custom_breadcrumbs', NULL, array(
'node_type' => $node->type,
), $languages);
if (!empty($breadcrumbs)) {
$objs = array(
'node' => $node,
);
if ($breadcrumb = custom_breadcrumbs_select_breadcrumb($breadcrumbs, $objs)) {
custom_breadcrumbs_set_breadcrumb($breadcrumb, $objs);
}
}
}
}