You are here

function hansel_action_add_link_to_node_get_crumbs in Hansel breadcrumbs 8

Same name and namespace in other branches
  1. 7 hansel.actions.inc \hansel_action_add_link_to_node_get_crumbs()

Callback for the "add link to node" breadcrumb action to generate the crumbs.

Parameters

array $arguments:

Return value

array

2 string references to 'hansel_action_add_link_to_node_get_crumbs'
hansel_hansel_action_types in ./hansel.module
Implements hook_hansel_action_types().
hook_hansel_action_types in ./hansel.hooks.inc
Define action types.

File

./hansel.actions.inc, line 57
Hansel breadcrumb actions

Code

function hansel_action_add_link_to_node_get_crumbs($arguments) {
  if (drupal_strtolower(hansel_arg(0)) == 'node' && is_numeric(hansel_arg(1))) {
    if ($node = node_load(hansel_arg(1))) {
      return array(
        array(
          'title' => $node->title,
          'href' => 'node/' . $node->nid,
        ),
      );
    }
  }
  return array();
}