如何更改创建页面的 Drupals 菜单选项

发布于 2024-07-14 11:55:15 字数 201 浏览 5 评论 0原文

我有一个带有有机组的 Drupal 站点,我希望一组能够访问菜单选项并将页面放置在 Primary_links 菜单中他们想要的任何位置。 其他组根本不应该能够访问它。

我已经使用权限完成了其中一些操作,但是有权访问菜单的用户可以访问所有菜单。 我只希望他们能够访问主要链接菜单。

我怎样才能做到这一点?

I have a Drupal site with Organic Groups and I want one group to be able to access the menu options and place the page in the primary_links menu where ever they want. The other group shouldn't be able to access it at all.

I have accomplished some of this with privileges, but the user who has access to the menus have access to all menus. I just want them to have access to the Primary Links menu.

How can i make this happen?

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

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

发布评论

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

评论(1

看轻我的陪伴 2024-07-21 11:55:15

好吧,如果您将菜单用作块,您可以定义允许哪些角色查看每个块。

此外,您还可以采用 Drupal 提供的 众多访问控制模块之一对于节点,因为不允许用户查看的节点不会出现在他的菜单中。

此外,您还可以编写代码来根据用户的角色来切换考虑将哪些菜单(您可以创建任意多个)作为主链接。

请注意,默认名称为“主链接”的菜单与实际页面上用于“主链接”的菜单设置之间存在差异。 配置此功能的正常位置是 admin/build/menu/settings,但可以通过修改 settings.php 中的全局 $conf 数组轻松覆盖它。 我认为该设置的名称类似于“menu_primary_links_source”。

Well, if you are using the menus as blocks, you can define what roles are allowed to see each block.

Also, you could adopt one of the quite many access control modules that Drupal offers for nodes, since a node that the user is not allowed to see will not show up in his menu.

Also, you could write code to switch around which of the menus (you can create as many as you want) is considered for primary links based on what role the user has.

Note that there's a difference between the menu which name is by default Primary Links and the setting of which menu should be used for "primary links" on the actual page. The normal place for configuring this is admin/build/menu/settings, but it can be easily overridden by messing with the global $conf array in settings.php. I think the setting is called something like 'menu_primary_links_source'.

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