默认展开 Drupal 菜单
对于菜单系统,有没有办法设置其中一个菜单项默认展开?我无法让我的主菜单项在主页上展开(至少),并且我希望在其他菜单项未展开时将其展开。
我正在使用 Drupal 5 和分类菜单模块。分类菜单对于我 95% 的页面来说非常好,但有些是静态的“关于我们”类型页面,我希望将主菜单作为默认页面,然后是主页。
For the menu system, is there a way to set one of the menu items to be expanded by default? I can't get my home menu item to be expanded on the homepage (at the least), and I'd like it to be expanded whenever one of the other ones isn't.
I'm using Drupal 5, and the Taxonomy Menu module. Taxonomy Menu is pretty good with 95% of my pages, but some are static "About Us" type pages, which I'd like to have the home menu as default for, and then there's the homepage.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
好吧,我想我找到了一个(悲伤的)答案。从 Drupal 网页上的一个 问题 来看,“正如所显示的,菜单系统Drupal 5 已损坏,并且不会再修复”。因此,我正在寻找一种新的方法来进行 Drupal 菜单系统之外的顶部导航。
解决方案:
我最终将导航系统放在 page.tpl.php 中。根据节点的内容(我从面包屑中提取分类法),它选择突出显示哪个节点,但默认为主页。它比我想要的更黑客,但它有效。
Well, I think I found a (sad) answer. From an issue on the Drupal webpage, "as it appears, the menu system of Drupal 5 is broken and won't be fixed anymore". So I'm finding a new way to do the top navigation that goes outside of Drupal's menu system.
Solution:
I ended up putting the navigation system in page.tpl.php. Based on the content of the nodes (I'm pulling the taxonomy from the breadcrumb), it chooses which one is highlighted, but defaults to home. It's hackier than I'd like, but it works.
如果您没有在 Drupal 5 上投入太多,那么升级到 Drupal 6 可能是值得的。您所要做的就是管理相关菜单并勾选“扩展”选项......
It might be worth upgrading to Drupal 6 if you don't have too much invested in Drupal 5. Then all you have to do is administer the relevant menu and tick the "Expanded" option for it...