0

I am using Drupal-7. I am trying to build a Fly out menu that have images, content blocks.

I am using the MuchoMenu to create top menu into my site.

I wanted to create Flyout menu same like displayed in Mucho Menu with image block.

I have created Main MuchoMenu, Mini Panels, Content Types to display images and content blocks.

But, my Menu Items are not displaying into my website. Do I have to add anything into my page.tpl.php or page--front.tpl.php pages? I have added Main MuchoMenu block into "Main Menu" Region.

In both page.tpl.php and page--front.tpl.php files, I have added this into menu section:

<div id="nav_wrapper" class="nav_wrapper">
        <?php if ($main_menu): ?>
          <div id="main-menu" class="nav">
            <?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(''),
                'level' => 'h2',
                'class' => array('element-invisible'),
              ),
            )); ?>
          </div> <!-- /#main-menu -->
        <?php endif; ?>

    <?php if ($secondary_menu): ?>
      <div id="secondary-menu" class="nav">
        <?php print theme('links__system_secondary_menu', array(
          'links' => $secondary_menu,
          'attributes' => array(
            'id' => 'secondary-menu-links',
            'class' => array('links', 'inline', 'clearfix'),
          ),
          'heading' => array(
            'text' => t(''),
            'level' => 'h2',
            'class' => array('element-invisible'),
          ),
        )); ?>
      </div> <!-- /#secondary-menu -->
 </div>  <!-- End of nav_wrapper  -->
    <?php endif; ?>

Please let me know as I am new to Drupal.

Thanks!

1 Answer 1

0

Thanks for editing @Krishna Mohan.

I have changed module from MuchoMenu to "TB Mega Menu". TB Mega Menu allows us to create block into drop down menu.

And, I think "to display custom menu" need to print block into that region.

So, Define region into .info file and print that block into page.tpl.php file.

So, in page.tpl.php replace code with this:

<div id="nav_wrapper" class="nav_wrapper">
          <div id="main-menu" class="nav">

             <?php print render($page['top_menu']); ?>

          </div> <!-- /#main-menu -->
</div>  <!-- End of nav_wrapper  -->

I am new to drupal, so I might be wrong.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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