You are here

function nodesymlinks_token_info in NodeSymlinks 7

Implements hook_token_info().

File

./nodesymlinks.module, line 229
Node Symlinks allows creating duplicate menu links with unique id to all nodes. As a result all these duplicates have unique menu trails and breadcrumbs.

Code

function nodesymlinks_token_info() {
  $type = array(
    'name' => t('Nodesymlinks'),
    'description' => t('Tokens related to nodesymlinks.'),
    'needs-data' => 'node',
  );

  // Chained node tokens.
  $nodesymlink['node'] = array(
    'name' => t('Node'),
    'description' => t('Node of the nodesymlink.'),
    'type' => 'node',
  );

  // Chained menu tokens.
  $nodesymlink['menu-link'] = array(
    'name' => t('Menu link'),
    'description' => t("The menu link for this node."),
    'type' => 'menu-link',
  );
  return array(
    'types' => array(
      'nodesymlink' => $type,
    ),
    'tokens' => array(
      'nodesymlink' => $nodesymlink,
    ),
  );
}