function nodesymlinks_token_list in NodeSymlinks 6
Implementation of hook_token_list().
File
- ./
nodesymlinks.module, line 264 - 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_list($type = 'all') {
$tokens = array();
if ($type == 'nodesymlinks' || $type == 'all') {
$tokens['nodesymlinks']['nodesymlinks-nodepath'] = t("The URL path of the node the nodesymlink belongs to.");
$tokens['nodesymlinks']['nodesymlinks-menu'] = t("The name of the menu the node belongs to.");
$tokens['nodesymlinks']['nodesymlinks-menu-raw'] = t("The name of the menu the node belongs to.");
$tokens['nodesymlinks']['nodesymlinks-menupath'] = t("The menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /.");
$tokens['nodesymlinks']['nodesymlinks-menupath-raw'] = t("The unfiltered menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /.");
$tokens['nodesymlinks']['nodesymlinks-menu-link-title'] = t("The text used in the menu as link text for this item.");
$tokens['nodesymlinks']['nodesymlinks-menu-link-title-raw'] = t("The unfiltered text used in the menu as link text for this item.");
$tokens['nodesymlinks']['nodesymlinks-menu-link-mlid'] = t("The unique ID of the node's menu link.");
$tokens['nodesymlinks']['nodesymlinks-menu-link-plid'] = t("The unique ID of the node's menu link parent.");
// Access also node tokens
if (variable_get('nodesymlinks_node_tokens', 0) && $type == 'nodesymlinks') {
$tokens += token_get_list('node');
}
}
return $tokens;
}