I have multiple group types and would like to display group members but only in some group types but not others.
With views arguments when using validator of group node I am unable to exclude specific group types. Using validator of node I am not able to restrict to members only if groups have public home pages. I have tried adding relationships to no avail. I have searched high and low and cannot find a solution. I would appreciate any helpful pointers. Thanks.

Comments

izmeez’s picture

From another thread http://drupal.org/node/343533 I see that I may need to include php in the views argument to achieve this.

EDIT
I am still unable to get a views argument validator that is php to return true for a specific group type.
The following is the code I thought would work but it does not. Any help would be appreciated.

global $current_view;
print $current_view->args[0];
$gid = arg(1);
    if (og_is_group_member($gid)) {
      $currentGroup = og_get_group_context();
      $groupType = $currentGroup->type;
      if (!strcmp($groupType, "group_typename"))
        { return TRUE;}
    }

Thanks,

Izzy

izmeez’s picture

and wondering if anyone can offer some help. I need a way to create a Views argument to select Group node and validate user is a member but to distinguish specific groups. From what I have read this does not seem to be a matter for a relationship (but, I could be wrong). And my attempts at using a php validator have failed.

I'm wondering if I should put this in the views issue queue as a support or feature request.

Any help or pointers in the right direction would be appreciated. Thanks,

Izzy

izmeez’s picture