Hi

How to converting $primary_links div into a block/region?

   <?php if (isset($primary_links)) : ?>
     <?php echo theme('links', $primary_links, array('class' => 'links primary-links')) ?>
   <?php endif; ?>

the I can use Nice Menus (http://drupal.org/project/nice_menus) to have this menu links in drop-menu feature easily.

I wonder if there is another way to have drop menu feature for primary links in this theme?

Thanks.

Babs

Comments

Sophia’s picture

If you are using the nice menus module, just replace

<?php if (isset($primary_links)) : ?>
     <?php echo theme('links', $primary_links, array('class' => 'links primary-links')) ?>
   <?php endif; ?>

in your page.tpl.php with

<?php
print theme('nice_menu_primary_links'); 
?>

That's all

bgogoi’s picture

Hi Sophia:

Thanks for the tip. But it was I think applicable for d5. for my D6, installation, I did the fllowing:

 <?php
$menu = theme('nice_menu', 3, 'primary-links', NULL, 'down');
print $menu['content'];
?>

The instructions are at: Theme Functions in 6.x

:)

restyler’s picture

Status: Active » Closed (works as designed)

You can also render any block to specific position in template (not region) by using the code below:

$block = module_invoke('block', MODULENAME, 'view', BLOCK_DELTA);
print $block['content'];
markconroy’s picture

What code would you need to do the same for DHTML Menus (using dhtml menu module). I'd prefer to use a scrolling dhtml drop down than the Nice Menus one?

Thanks,
Mark C.