




Simple Menu – Generates an XML hierarchy that can be used to generate menus in XSL/T. Especially useful for Pages. Requires php 4 (Sablotron) or php 5, tested WP 2.7. An empty XSL template is included where you can specify your own custom XSL transform.
Usage Example:
global $post;
$current_node_depth = 0;
// if there is a parent, then get siblings + children
if ($post->post_parent)
$results = get_pages('child_of='.$post->post_parent.'&sort_column=menu_order&sort_order=desc');
else
$results = get_pages('child_of='.$post->ID.'&sort_column=menu_order&sort_order=desc');
$treeMenu = new Walker_simpleMenu();
print($treeMenu->build_menuXML($results, $current_node_depth + 2, 'xsl_template.xsl'));








