drupalfun.com
How to create "Find a Match" block with Views
Hello Dorien, I am a great fan of your book and your works. It's awesome and so impressive. I feel envious. I've learnt a lot about drupaling from you. Thanks. I am confused about one little thing. Can you please elaborate on steps to create Find a Match Block. I tried creating Views (with Page views added): Name- member search, Fields - Content Avatar, user: Name, Content:About me, Node:teaser. Filter - Node:pub yes, Node:type profile, Node:Content gender (I am) Exposed. Node: content gender (searching for) Exposed. Then I exposed this views form in Block. I enabled this block in sidebar. There I am getting all the fields but it is leading to an empty page .. with no search. Please guide me - where I am missing something or doing something wrong. I feel it should add a user requester Relationship in views or maybe an argument. I tried many means without success. Please guide me as to how to do it rightly.
Related Questions
Responses
2. How will it have options then, without exposing?
Hi Dorien, First I must thank you heartily for a prompt reply - really so sweet of you. Next, alas, I couln't get ur hint. What do u mean by filters without exposining? Dear Dorien, plz plzzzz tell me as u did in your great book, step by step, as if a walk thru holding hands. How can I then have Options to select from list without exposing.
Well here are as such only two fields: "I am -- (male/female)" and "Searching for -- (male -age 10-20, 20-30 etc./same for female) ". Now plz just tell me from your great expertise.. what should be rightly put in Fields and Filter columns.
Fields: --
Filter: ---
I am so confused now that I am unable to decide. Plz help. It will be so kind of you. Thanks again!
3. Hi, I do mean expose them.
Hi,
I do mean expose them. Only don't check the block option. So you have the filters on the same page as the results.
4. Find a Match block is still not configured
Thanks again. But sadly, it didn't work. When I removed Exposed to block option, filter option does show in Page view but after applying search with say, I am 'Male' - searching for 'Female' shows no result. When I set I am to 'Any' and searching for to 'Female' -- search shows all the users irrespective of genders. That is understandable. because of the presence of two gender options with just two different labels: "I am" and "Searching for" creating confusion for search query and hence this weird results. Besides, without exposing filter in block hardly serves any purpose as I am not able to set a search block for users to find a match this way.
I feel there must be some other way out of this simple problem. Ah, it is so disheartening to realise that I am not able to do such a seemingly simple task. :(
5. Hi, The labels are used in
Hi,
The labels are used in the other way:
"I am" is the label for the "searching for" field
and "searching for" is the label of the "i am" field.
This makes sense, since you are looking at the profiles from the point of view of the person they want to mean. Hence, the switch.
6. But it is not giving working
Hello Dorien, I tried once again but it is not working. I am getting the same blank page if I click the search button on selcting I am (male) and srchng (fem) and when both are put on any,it is showing full page irrespective of gender. What is the solution? if possible, plz tell me.
7. Hey it works in a way.. half way rather
Hi Dorien, I am here again. I have tried one last time after making a new views once again and changed the field name for (searching for expose) provided by views to what I have put in profile .. field_gender , deleting all suffix added by views. . On checking I found that it works half way .. that is to say.. If I leave the "I am' blank or at 'Any' then it searches rightly and find male or female search. But when I put I am field at Male or Female... it draws a blank page. Can you please figure out what is wrong?
8. Do you have a screenshot of
Do you have a screenshot of your views configurations page?
And are you certain that there are node which have female or male filled in! in the exact same spelling (remember to switch I am for Searching for)


1. Hi, You don't need a
Hi,
You don't need a relationship or arguments in the view. Did you try the filters without exposing them? This way you can check if it's something about your view or the block function.