function hosting_set_breadcrumb in Hostmaster (Aegir) 6
Generate context sensitive breadcrumbs.
Parameters
$node: A node object to use for context of the breadcrumbs.
4 calls to hosting_set_breadcrumb()
- hosting_package_view in modules/
hosting/ package/ hosting_package.module - Implementation of hook_view().
- hosting_server_view in modules/
hosting/ server/ hosting_server.module - Implementation of hook_view().
- hosting_site_view in modules/
hosting/ site/ hosting_site.nodeapi.inc - Implementation of hook_view().
- hosting_task_view in modules/
hosting/ task/ hosting_task.module - Implementation of hook_view().
File
- modules/
hosting/ hosting.module, line 565 - 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;
}
drupal_set_breadcrumb($breadcrumbs);
}