I am sorry to be cross posting this. I have previously asked this question in the post-installation forum to avoid overburdening the views issue queue but have been unable to resolve my difficulties, http://drupal.org/node/631236
I would like to be able to list the users in groups of a specific group type only and restrict the view to users in the group. I believe this is an issue that requires proper use of arguments rather than a relationship, but I may be wrong.
When I use the validator Group node I am unable to specify a specific group type.
I have tried using the php code validator without success using the following:
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;}
}
I am not sure if the php code I am using is wrong or if the php code validator is not working for this along the lines of another item in the issue queue http://drupal.org/node/616402
This is very important to me and I would appreciate any help to resolve it.
Thanks,
Izzy
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | og_members Views argument for group type.txt | 9.45 KB | izmeez |
Comments
Comment #1
dawehnerCould you please export your view?
Additional, do you have embed the view in a panel?
Comment #2
merlinofchaos commentedI don't use og, so I can't really answer this; you might do as well to get an answer by posting in the og queue.
Comment #3
izmeez commented@dereine, The view is not embedded in a panel and I am attaching the views export as a file. Hope that is fine.
This is essentially the default og_members view with an additional page view called membership.
If the "php code" validator is set to conditionally return TRUE for a specific group type, the tab menu correctly shows on only the specific group type pages and the path on "hover" is correct but click to that path yields "page not found".
If the "php code" validator is forced to always return TRUE, the tab menu appears on all group types as expected and the path on hover is correct and click shows the membership list for all group types.
I would like to get the conditional return TRUE to work.
Thanks,
Izzy
Comment #4
izmeez commentedI have just come across this item http://drupal.org/node/639294 which has a patch for og views. I have not had a chance to test it yet.
Comment #5
bonobo commentedThe patch referenced at #639294: More granular argument validation for OG Group Nodes does exactly this -- this is not a Views issue.
Closing this out. Please add reviews/feedback into the patch at #639294: More granular argument validation for OG Group Nodes.
Comment #6
bonobo commented