My menu structure looks like the structure in the left part of the image. I want the output to look like the right part of the image when I'm in the 'oranges' page for example. This works great if done from Drupal's admin panel, but is there any way I can code it in my page.tpl.php?
Currently, I'm using the code below to output my menu, but I can't seem to get it to look exactly the way I want.
<?php $main_menu = menu_navigation_links('main-menu', 2); print theme('links', array( 'links' => $main_menu, 'attributes' => array( 'id' => 'main-menu', 'class' => array('links', 'clearfix'), ), 'heading' => array( 'text' => t('Main menu'), 'level' => 'h2', 'class' => array('element-invisible'), ), )); ?>