A common request by designers is to set up a website with a main top navigation and secondary sub nav based on the page you are on. An example of this can be found on the Out of Chaos website where once you leave the home page, the sidebar displays the different pages belonging to that section.

This can easily by done by updating your sidebar template using conditionals.
For example:

<ul>
<?php if(is_page(2) || is_child(2)) {
  wp_list_pages('child_of=2&depth=1&title_li=');
 } elseif (is_page(3) || is_child(3)) {
  wp_list_pages('child_of=3&depth=1&title_li=');
 } elseif (is_page(4) || is_child(4)) {
  wp_list_pages('child_of=4&depth=1&title_li=');
 } else (!is_page()) {
  wp_list_categories('title_li=');
}?>
</ul>

Where the # refer to the page id of your page.

Now if you run this code above, you’ll most likely get an error. This is because the is_child() function is NOT part of WordPress core. In order for the code to work we must use c.bavota’s is_child() function.

function is_child($page_id_or_slug) { 
 global $post; 
  if(!is_int($page_id_or_slug)) {
   $page = get_page_by_path($page_id_or_slug);
   $page_id_or_slug = $page->ID;
  } 
  if(is_page() && $post->post_parent == $page_id_or_slug ) {
   return true;
   } else { 
    return false; 
 }
}

Once the above code snippet is added to your function file, you can easily add as many sub navigation menus as you need.