views:

171

answers:

1

Hi friends,

I'm new at drupal.

I installed Nice Menus Module. When I add to sidebar block at Blocks Settings Page, it works fine. but when I add it to Navigation block, it doesnt work :( it just display the parent links, not the child ones.

my page.tpl.php

<?php if (!empty($primary_links)): ?>
<div id="nav" class="clear-block">
<?php print theme('links', $primary_links, array('class' => 'links primary-links')); ?>
</div>
<?php endif; ?>

Should I add anything to the code above to turn to Nice Menu style?

Appreciate helps!!! Thanks a lot!


SORTED!

http://drupal.org/node/210441

A: 

I have not used nice menus yet, but as far as I understand the documentation, you either use it to replace an existing menu with an explicitly created nice menu block, or you use a nice menu specific theming function to create it yourself.

As for the primary links menu, there is also a 'shortcut' theme function theme_nice_menu_primary_links(). It basically does what you'd need to do yourself, that is theming the primary links menu using the nice menu theme function:

function theme_nice_menu_primary_links($direction = 'down', $menu = NULL) {
  $menu_name = variable_get('menu_primary_links_source', 'primary-links');
  $output = theme('nice_menu', 0, $menu_name, 0, $direction, $menu);
  return $output['content'];
}
Henrik Opel
Ok, last edit was redundant to the OPs own findings - didn't see his edit before :/
Henrik Opel