function nodehierarchy_token_list in Node Hierarchy 5
Same name and namespace in other branches
- 6.3 includes/nodehierarchy_token.inc \nodehierarchy_token_list()
- 6 nodehierarchy_token.inc \nodehierarchy_token_list()
- 6.2 includes/nodehierarchy_token.inc \nodehierarchy_token_list()
File
- ./
nodehierarchy_token.inc, line 33 - token.module integration functions for nodehierarchy.module
Code
function nodehierarchy_token_list($type = 'all') {
if ($type == 'node' || $type == 'all') {
$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 the title of the node itself. Separated by /. Equivalent of [hierarchypath]/[title].");
$tokens['node']['fullhierarchytitlepath-raw'] = t("The node's ancestors' titles in order the title of the node itself. Separated by /. Equivalent of [hierarchypath]/[title]. WARNING - raw user input.");
$tokens['node']['hierarchypath'] = t('The url of the parent of the given node. To be used with pathauto. Should be used if any descendant node has a url not generated by pathauto (ie: hand edited)');
$tokens['node']['fullhierarchypath'] = t('The url of the parent of the given node with the node title itself. Equivalent of [hierarchyurl]/[title]');
return $tokens;
}
}