How can I custom the output menu like stack in drupal 7. The main menu link appear above and the sub-menu link appear below, or some menu styles like this.
In Bartik theme, the $main_menu variable only content primary menu information but no child. So I must custom this variable or do something else to solve my problem ? Here is what i said:
<div id="main-menu" class="navigation">
<?php print theme('links__system_main_menu', array(
'links' => $main_menu,
'attributes' => array(
'id' => 'main-menu-links',
'class' => array('links', 'clearfix'),
),
'heading' => array(
'text' => t('Main menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
)); ?>
</div> <!-- /#main-menu -->