You are here

function hosting_set_breadcrumb in Hosting 6.2

Same name and namespace in other branches
  1. 5 hosting.module \hosting_set_breadcrumb()
  2. 7.4 hosting.module \hosting_set_breadcrumb()
  3. 7.3 hosting.module \hosting_set_breadcrumb()

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 package/hosting_package.module
Implementation of hook_view().
hosting_server_view in server/hosting_server.module
Implementation of hook_view().
hosting_site_view in site/hosting_site.nodeapi.inc
Implementation of hook_view().
hosting_task_view in task/hosting_task.module
Implementation of hook_view().

File

./hosting.module, line 598
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);
}