--- C:/Documents/Dev/drupal/outline/pathauto/pathauto_node.inc Mon Feb 05 20:31:41 2007 +++ C:/Documents/Dev/drupal/v5/modules/pathauto/pathauto_node.inc Sun May 27 17:31:52 2007 @@ -53,7 +53,13 @@ $settings["placeholders"][t('[bookpath]')] = t('For book pages, the full hierarchy from the top-level book.'); } - + + if (module_exists('outline')) { + $settings["placeholders"][t('[outline]')] = + t('For outline pages, the title of the top-level page.'); + $settings["placeholders"][t('[outlinepath]')] = + t('For outline pages, the full hierarchy from the top-level page.'); + } // Look for extensions from other modules $placeholders = module_invoke_all('pathauto_node', 'placeholders'); $settings['placeholders'] = array_merge($settings['placeholders'], $placeholders); @@ -151,6 +157,28 @@ $placeholders[t('[book]')] = ''; $placeholders[t('[bookpath]')] = ''; } + + // Outline + if (module_exists('outline') and !empty($node->volume_id) ) { + $path = outline_location($node); + $placeholders[t('[outline]')] = pathauto_cleanstring($path[0]->title); + $outlinehierarchy = outline_location($node); + $outlinepath = ''; + foreach ($outlinehierarchy as $outlineelement) { + if ($outlinepath == '') { + $outlinepath = pathauto_cleanstring($outlineelement->title); + } + else { + $outlinepath = $outlinepath . '/' . pathauto_cleanstring($outlineelement->title); + } + } + $placeholders[t('[outlinepath]')] = $outlinepath; + } + else { + $placeholders[t('[outline]')] = ''; + $placeholders[t('[outlinepath]')] = ''; + } + // And now taxonomy, which is a bit more work if (module_exists('taxonomy') && is_array($node->taxonomy) && count($node->taxonomy) > 0) {