function menu_token_list in Token 6
Implements hook_token_list() on behalf of menu.module.
File
- ./
token_node.inc, line 183 - Implementations of token module hooks for the core node and book modules.
Code
function menu_token_list($type = 'all') {
$tokens = array();
if ($type == 'node' || $type == 'all') {
$tokens['node']['menu'] = t("The name of the menu the node belongs to.");
$tokens['node']['menu-raw'] = t("The name of the menu the node belongs to.");
$tokens['node']['menupath'] = t("The menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /.");
$tokens['node']['menupath-raw'] = t("The unfiltered menu path (as reflected in the breadcrumb), not including Home or [menu]. Separated by /.");
$tokens['node']['menu-link-title'] = t("The text used in the menu as link text for this item.");
$tokens['node']['menu-link-title-raw'] = t("The unfiltered text used in the menu as link text for this item.");
$tokens['node']['menu-link-mlid'] = t("The unique ID of the node's menu link.");
$tokens['node']['menu-link-plid'] = t("The unique ID of the node's menu link parent.");
$tokens['node']['menu-link-parent-path'] = t('The URL alias of the parent menu link of the node.');
$tokens['node']['menu-link-parent-path-raw'] = t('The URL alias of the parent menu link of the node.');
}
return $tokens;
}