function nodesymlinks_pathauto in NodeSymlinks 6
Same name and namespace in other branches
- 7 nodesymlinks.module \nodesymlinks_pathauto()
Implementation of hook_pathauto().
File
- ./
nodesymlinks.module, line 225 - 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_pathauto($op) {
switch ($op) {
case 'settings':
$settings = array();
$settings['module'] = 'nodesymlinks';
$settings['token_type'] = 'nodesymlinks';
$settings['groupheader'] = t('Nodesymlinks paths');
$settings['patterndescr'] = t('Default path pattern (applies to all node types with blank patterns below)');
$settings['patterndefault'] = '[nodesymlinks-menupath-raw]';
$settings['bulkname'] = t('Bulk generate aliases for nodesymlinks that are not aliased');
$settings['bulkdescr'] = t('Generate aliases for all existing nodesymlinks which do not already have aliases.');
$node_settings = node_pathauto($op);
$settings['placeholders'] = $node_settings->placeholders;
// Next two settings is supported from Pathauto 2+
// Pathauto 1.x simply calls $function = $module . '_pathauto_bulkupdate';
$settings['batch_update_callback'] = '_nodesymlinks_pathauto_bulkupdate';
$settings['batch_file'] = drupal_get_path('module', 'nodesymlinks') . '/nodesymlinks.pathauto.inc';
return (object) $settings;
default:
break;
}
}