Drupal 6:导航块上的 Nice_menus 模块

发布于 2024-09-03 22:23:46 字数 572 浏览 2 评论 0原文

我是 drupal 的新手。

我安装了尼斯菜单模块。当我在“块设置”页面添加到侧边栏块时,它工作正常。但是当我将它添加到导航块时,它不起作用:(它只显示父链接,而不是子链接。

我的 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; ?>

我应该在上面的代码中添加任何内容以变成漂亮的菜单样式吗?

感谢帮助!非常感谢!


已排序!

http://drupal.org/node/210441

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情绪少女 2024-09-10 22:23:46

我还没有使用过漂亮的菜单,但据我了解文档,您可以使用它来替换具有明确创建的漂亮菜单块的现有菜单,或者使用漂亮的菜单特定主题功能 自己创建。

至于主链接菜单,还有一个“快捷”主题函数theme_nice_menu_primary_links()。它基本上完成了您需要自己做的事情,即使用漂亮的菜单主题功能对主链接菜单进行主题化:

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

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'];
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文