开发者

Drupal 6: Nice_menus module at navigation block

开发者 https://www.devze.com 2023-01-01 09:17 出处:网络
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

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


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'];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消