0

I have created menus with sub-menus in the header.

It is supported by some themes .

But some themes don't support this. e.g Bartik, fontfolio etc.

I want to use the drop down as customized in the main-menu region, so as to display in these themes also.

How can I edit this in the drupal page.tpl?

As I am new to drupal, please suggest me.

E.g Dropdown not Supported in this format:

    <?php print theme('links__system_main_menu', array(
      'links' => $main_menu,
      'attributes' => array(
        'id' => 'menu',
        'class' => array('links', 'inline', 'clearfix', 'menu'),
      ),
      'heading' => array(
        'text' => t('Menu'),
        'level' => 'h2',
        'class' => array('element-invisible'),
      )));
    ?>
1

I have found some possible answers related to your solution.

SOLUTION 1:

The main menu in Bartik only displays the first level. Since it's hardcoded in page.tpl.php there's nothing you can do about it.

Here's how to get the menu to work properly:

  1. In your theme settings (admin/appearance/settings/bartik) disable "Main menu".
  2. Go to admin/structure/block and add the "Main Menu" block to the header region (or wherever you want it).

Alternatively, you can also check out the excellent Menu Block module, which generates extra customizable blocks (1st level, 2nd level, etc) for each menu.

SOLUTION 2:

There are some useful resources that may help you to solve your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.