Child Menus don't work, even when 'expand' is forced

()

Using the $primary_links variable in page.tpl.php doesn’t include the child items, even when Expanded is selected in the Drupal menu config. I tried a number of different theme functions, but nothing seemed to work. What did work finally was calling from the page.tpl.php

    print theme('menu_tree','primary-links');

For the id, I used the template.php function:

    function phptemplate_menu_tree($tree) {
      $id=strpos($tree,'href="/"')!==FALSE?' id="primarylinks"':'';
      return '';
    }

There’s probably a better way to do it, but that’s how I got the id for the main menu set to primarylinks, and default for the child menus.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 7 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

wordpress blog stats