function _pathauto_token_list in Pathauto 6.2
Implements hook_token_list().
1 call to _pathauto_token_list()
- pathauto_token_list in ./
pathauto.module - Implements hook_token_list().
File
- ./
pathauto.tokens.inc, line 13 - Builds placeholder replacement tokens for pathauto.
Code
function _pathauto_token_list($type = 'all') {
$tokens = array();
if (module_exists('taxonomy')) {
if ($type == 'taxonomy' || $type == 'all') {
$tokens['taxonomy']['catpath'] = t('As [cat], but including its supercategories separated by /.');
$tokens['taxonomy']['catpath-raw'] = t('As [cat-raw], but including its supercategories separated by /.');
$tokens['taxonomy']['catalias'] = t('The URL alias of the taxonomy term.');
$tokens['taxonomy']['catalias-raw'] = t('The URL alias of the taxonomy term.');
}
if ($type == 'node' || $type == 'all') {
$tokens['node']['termpath'] = t('As [term], but including its supercategories separated by /.');
$tokens['node']['termpath-raw'] = t('As [term-raw], but including its supercategories separated by /.');
$tokens['node']['termalias'] = t('The URL alias of the taxonomy term.');
$tokens['node']['termalias-raw'] = t('The URL alias of the taxonomy term.');
}
}
if (module_exists('book')) {
if ($type == 'node' || $type == 'all') {
$tokens['node']['bookpathalias'] = t('The URL alias of the parent book of the node.');
$tokens['node']['bookpathalias-raw'] = t('The URL alias of the parent book of the node.');
}
}
return $tokens;
}