Child menu items not displayed in drupal I've a sub-menu like this:



I'm trying to build a custom theme, I just copied which contains following code:

&lt;?php if ($main_menu || $secondary_menu): ?&gt;
  &lt;div id="navigation"&gt;&lt;div class="section"&gt;
    &lt;?php print theme('links__system_main_menu', array('links' =&gt; $main_menu, 'attributes' =&gt; array('id' =&gt; 'main-menu', 'class' =&gt; array('links', 'inline', 'clearfix')), 'heading' =&gt; t('Main menu'))); ?&gt;
    &lt;?php print theme('links__system_secondary_menu', array('links' =&gt; $secondary_menu, 'attributes' =&gt; array('id' =&gt; 'secondary-menu', 'class' =&gt; array('links', 'inline', 'clearfix')), 'heading' =&gt; t('Secondary menu'))); ?&gt;
  &lt;/div&gt;&lt;/div&gt; &lt;!-- /.section, /#navigation --&gt;
&lt;?php endif; ?&gt;


This is how its being displayed: Note that not even the HTML for child menu items are generated.


Yes, I've Show as expanded option checked for "Publications". 

PS:
Why does drupal make even such simple things difficult. No wonder, its losing ground to wordpress.
Try this:

&lt;?php
$menu_name = variable_get('menu_main_links_source', 'main-menu');
$tree = menu_tree($menu_name);
print drupal_render($tree);
?&gt;


Also Drupal doesn't make things hard, you just don't understand it yet.

It is just a tool suited to specific tasks. If you just want to make a blog then don't use Drupal, just use Wordpress.

If however you want a very powerful CMF (Content management framework, not system) to create complex systems with lots of inter-related entities then continue to learn Drupal - I think it's the best tool for the job.