有机群体 API?
在有机组 (D6) 领域内,我可以找到一些执行以下操作的函数:
- 检索所有组的列表
- 检索每个组的功能列表(迭代组时)
- 获取组和组的链接功能,针对当前用户的菜单访问进行检查
我正在查看代码,但并没有真正看到我正在寻找的东西 - 或者也许我看到了它但没有意识到它。
我正在尝试构建一个基于组的自定义导航,并希望构建自己的菜单结构,而不是将所有组和所有所述组功能放在 Drupal 管理的菜单中(可能有 20 个组以上,需要管理很多)。
Where within the realm of Organic Groups (D6) can I find a few functions that do the following:
- Retrieve a list of all Groups
- Retrieve a list of Features for each Group (when iterating Groups)
- Grab links for Groups & Features, checked against menu access for current user
I am looking through the code, but not really seeing what I am looking for- or maybe I saw it and didn't realize it.
I am trying to build a custom navigation based on Groups and want to construct my own menu structure instead of have all groups, and all said groups features, be in a Drupal managed menu (upwards of possibly 20 groups, a lot to manage).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
og_all_groups_options() 将为您提供所有组的列表。我认为功能信息保存在
settings
列的og_features
表中,因此您可以使用每个组节点的nid
获取数据循环的迭代您可以使用 l 函数 建立您的链接使用这样的访问检查:
希望有帮助
og_all_groups_options() will get you a list of all the groups. I think the features info is held in the
og_features
table in thesettings
column so you could get the data using the group node'snid
in each of your loop's iterationsYou can use the l function to build up your link with an access check using like this:
Hope that helps