We're using Drupal 5.x and Views 1
I want to create a view that will recommend "groups you have NOT joined yet" to a user, but i'm having trouble getting it working.
A typical View filter for "my groups" would be-
OG: Group in User Subbed Groups Is Equal to Currently logged in user
Unfortunately, just changing the filter function in the middle-
OG: Group in User Subbed Groups Is Not Equal to Currently logged in user
doesn't work. Not only do groups the user IS a member of appear in the list, but the same group can also occur multiple times! I think I am actually getting something like "List all groups whose members include someone other than me", that is not what I need.
Is this apparently simple search possible in Views, or do I need a custom coded view? (probabaly beyond my limited programming skills).
Comments
Answering my own questions
Oook, in the spirit of trying to increase the answer-to-question ratio a bit here, after a lot of late night Googling and going down blind alleys with Views arguments
etc., I have come to the following conclusion on two questions-
of? No- you need a custom SQL query.
but you CAN build a "view-like table" that looks pretty much the same to
the end user.
The following code, dropped into a page or block with PHP execution enabled, builds a "Promo groups" list for the current user based on- 1) The group having the"promoted" flag set, 2) The user not already being a member of the group.
Note:
* Our database schema has custom elements, the query will need to be changed to suit your database structure.