diff options
Diffstat (limited to 'includes/menu.inc')
-rw-r--r-- | includes/menu.inc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index e3adaaf3e..b19abdbb4 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -787,11 +787,31 @@ function _menu_link_map_translate(&$map, $to_arg_functions) { } } +/** + * Returns path as one string from the argument we are currently at. + */ function menu_tail_to_arg($arg, $map, $index) { return implode('/', array_slice($map, $index)); } /** + * Loads path as one string from the argument we are currently at. + * + * To use this load function, you must specify the load arguments + * in the router item as: + * @code + * $item['load arguments'] = array('%map', '%index'); + * @endcode + * + * @see search_menu(). + */ +function menu_tail_load($arg, &$map, $index) { + $arg = implode('/', array_slice($map, $index)); + $map = array_slice($map, 0, $index); + return $arg; +} + +/** * This function is similar to _menu_translate() but does link-specific * preparation such as always calling to_arg functions * |