function hosting_set_breadcrumb in Hosting 7.4
Same name and namespace in other branches
- 5 hosting.module \hosting_set_breadcrumb()
- 6.2 hosting.module \hosting_set_breadcrumb()
- 7.3 hosting.module \hosting_set_breadcrumb()
Generate context sensitive breadcrumbs.
Parameters
object $node: A node object to use for context of the breadcrumbs.
5 calls to hosting_set_breadcrumb()
- hosting_package_view in package/
hosting_package.module - Implements hook_view().
- hosting_platform_view in platform/
hosting_platform.module - Implements hook_view().
- hosting_server_view in server/
hosting_server.module - Implements hook_view().
- hosting_site_view in site/
hosting_site.nodeapi.inc - Implements hook_view().
- hosting_task_view in task/
hosting_task.module - Implements hook_view().
File
- ./
hosting.module, line 910 - Hosting module.
Code
function hosting_set_breadcrumb($node) {
$breadcrumbs[] = l(t('Home'), NULL);
switch ($node->type) {
case 'task':
$breadcrumbs[] = _hosting_node_link($node->rid);
break;
case 'platform':
$breadcrumbs[] = _hosting_node_link($node->web_server);
break;
case 'site':
$breadcrumbs[] = _hosting_node_link($node->platform);
break;
case 'server':
$breadcrumbs[] = l(t('Servers'), 'hosting/servers');
break;
}
$breadcrumbs[] = _hosting_node_link($node->nid);
drupal_set_breadcrumb($breadcrumbs);
}