开发者

Organic Groups API?

开发者 https://www.devze.com 2023-04-03 19:17 出处:网络
Where within the realm of Organic Groups (D6) can I find a few functions that do the following: Retrieve a list of all Groups

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 acc开发者_如何学Pythoness 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).


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 the settings column so you could get the data using the group node's nid in each of your loop's iterations

You can use the l function to build up your link with an access check using like this:

if (og_is_group_member($group->gid)) {
  $link = l($group->title, "node/nid");
}

Hope that helps

0

精彩评论

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