function nodehierarchy_token_list in Node Hierarchy 6.3
Same name and namespace in other branches
- 5 nodehierarchy_token.inc \nodehierarchy_token_list()
- 6 nodehierarchy_token.inc \nodehierarchy_token_list()
- 6.2 includes/nodehierarchy_token.inc \nodehierarchy_token_list()
Implementation of hook_token_list().
File
- includes/
nodehierarchy_token.inc, line 55 - token.module integration functions for nodehierarchy.module
Code
function nodehierarchy_token_list($type = 'all') {
if ($type == 'node' || $type == 'all') {
$tokens['node']['fullhierarchypath'] = t('The URL of the parent of the given node with the node title itself. Equivalent of [hierarchypath]/[title]. This is the recommended token for hierarchical URLs.');
$tokens['node']['hierarchypath'] = t('The URL of the parent of the given node. Like [fullhierarchypath] but without the node title.');
$tokens['node']['hierarchyparenttitle'] = t("The node's parent's title.");
$tokens['node']['hierarchyparenttitle-raw'] = t("The node's parent's title. WARNING - raw user input.");
$tokens['node']['hierarchyparentnid'] = t("The node's parent's nid.");
$tokens['node']['hierarchytitlepath'] = t("The node's ancestors' titles in order. Separated by /.");
$tokens['node']['hierarchytitlepath-raw'] = t("The node's ancestors' titles in order. Separated by /. WARNING - raw user input.");
$tokens['node']['fullhierarchytitlepath'] = t("The node's ancestors' titles in order, plus the title of the node itself. Separated by /. Equivalent of [hierarchytitlepath]/[title].");
$tokens['node']['fullhierarchytitlepath-raw'] = t("The node's ancestors' titles in order, plus the title of the node itself. Separated by /. Equivalent of [hierarchytitlepath]/[title]. WARNING - raw user input.");
return $tokens;
}
}