Posted by pkchoo on October 31, 2011 at 8:12am
I know I'm going to kick myself when I get the answer, but for some reason I can't get this to work.
I'm creating a view for a list of sports teams.
I'm able to create the listing fine, where all the teams members show up, but when I try to filter it also by gender, only the team title shows up.
I have a team content type with user references to populate the players. The view is grouped by the team title with a listing of the users and their attributes.
I suppose I could add a "gender" field to the user, but that would filter out the team coach if the coach was the opposite gender, right?
Any help would be greatly appreciated. Thank you.
Comments
Filter by gender
Hi,
I am working for a dating site, I need to create a view to display opposite gender. In my registration profile page there is a field name as looking for on the basic of that field I want to show members.For example men can see only women & vice verse.
Please suggest me what should to in simple steps. Please reply me as soon as possible.
Use Contextual filter
Hi Nidhi
Add a global field[php] in contextual filter and validate it by php code. Load the field "looking for on the basic " value by the global $user object and pass it to the argument.
use the above solution in my IMHO. :)
Thanks
Naveen Valecha
Naveen Valecha
https://www.valechatech.net
Use Contextual filter as suggested above
Hi pkchoo,
Use the same approach as you problem is also seems to be the same so use the same as I suggested here https://groups.drupal.org/node/187034#comment-1055458 IMHO :)
Naveen Valecha
https://www.valechatech.net
How to add php code in filter criteria
I am not getting your point from where to add php code in filter criteria.
could you please explain it more.
I am in trouble.
Please reply me asap.
thanks for your reply :)
Regard's ,
Nidhi
Add global php code in contextual filter
Add global php code in contextual filter
Naveen Valecha
https://www.valechatech.net