Posted by pmathur01 on April 13, 2011 at 9:17pm
Hi,
I am implementing a Real estate search for my website. I am using cck fields for the form. Can someone help me with creating a search. How do I get the range for price and bedrooms for a given value and set it to the taxonomy term. I am using taxonomy terms for bedrooms and price.
Thanks
Comments
Use Views and exposed filters
Set up a View using http://drupal.org/project/views .
Create a filter for each aspect for which you want to allow search -- Taxonomy Term, City Name, etc. This part may take some doing if you're not familiar with Views.
Set the filters so they show the default results you want. That could be all properties, or none, or only your own listings :) .
"Expose" each filter. (You do this by clicking it and then clicking the "Expose" button.). Change its options if you like. If you don't know Views well, try playing around here... some options have interesting effects.
Create a Page display for that View.
That's it! Now when someone goes to that page, they'll see a bunch of search fields. For an example, see http://tomgeller.com/portfolio .
That works for explicit selections, such as "Client" on my site (which is a taxonomy vocabulary.) I'm not sure how you'd do the price range, though. Anybody?
Tom Geller * Oberlin * San Francisco * TomGeller.com
Author/Presenter, Drupal video series at lynda.com
Creator of materials for Drupal-focused companies
Hi, Thanks, I had implemented
Hi,
Thanks, I had implemented it in a similar manner and just loved the views search but then the whole issue is to filter it by range. Is there a way that I can create a filter by range.. any suggestion??
Thanks.
Apache Solr?
I haven't tried it, and understand it's hard to set up, but have you tried Apache Solr?
If you want the easy way out, Acquia offers a hosted version. :)
Now, I'm not sure that it'd handle ranges... that's just a guess.
Tom Geller * Oberlin * San Francisco * TomGeller.com
Author/Presenter, Drupal video series at lynda.com
Creator of materials for Drupal-focused companies
I am using taxonomy terms for
Say what? Do you have a particular reason for this, or are you completely unaware of CCK? If the former, do tell.
The Boise Drupal Guy!
Price
How would you do price?
Would you just implement a range (i.e. $50,000-$75,000, $75,000-$100,000, etc.)?
I need to just feed in the
I need to just feed in the no: of bed bath and price as cck fields. Well regarding the taxonomy the reason for that was I fist started with taxonomy search through custom search. Well that did not work out. There is no particular reason for that. I then thought of exposing those fields in views. I can let the users to set the price range for that property but that would not work be bed and bath. As when search for 2+ it should list all properties with 2, 3,4 and 5 bed. I used faceted search but then I do not have much control as to how I want the search fields do be displayed.
Any Suggestions?
Thanks,
Prerna
If the field is a proper
If the field is a proper number field (not a generic text field), one of the settings for the filter should be to select "greater than," "equal to or greater than," "less than," or "equal to or less than" with regards to the value of the field (the exact terminology escapes me at the moment). That's what I'm using on this site (not quite live yet, though interwebs-accessible).
The Boise Drupal Guy!
Theme
Garrett, your site looks pretty sharp. What theme are you using? Did you do any custom work to make the properties display the way it does? I need to get my images to work just like you have them. Thanks for any feedback.
The theme is a subtheme of
The theme is a subtheme of Danland. I wouldn't recommend it, though; it's not very well done code-wise. But the client insisted on it…
The property listing table is a fairly straight-forward Views table, but I do use a good deal of trickery with the exposed filters to split them into two columns, add an autocomplete feature to the "City" field, and other things I can't recall.
The Boise Drupal Guy!
Thanks Garrett , I had no
Thanks Garrett , I had no idea that Integer has these options. Well I used form_alter and made it into a drop down. Still working on it but thats the way I am going now..
Prerna
This is what I was looking
This is what I was looking for. Thanks.
Drupal 中文开发教程
I am searching to build a Real Estate page too
I am trying to build a real estate site for sales and rentals in my small HOA. I created the CCK fields, but how do I
1). Create a view like the Type or Features on the bottom of this site http://www.selectaustin.com/advanced-search
2). Have it interact with a map like Google? (instead of mapquest like this site is)
I have added exposed views in calendar pages, but I am looking for more robust colorful views.
I think his site is tied into an MLS listing, that's more than I need. I just need a simple but nice looking site.
Any advise will help, thanks
Thomas
Drop Down
Hello,
I did not understand how to replace a field input by a drop-down list as on the site “http://tomgeller.com/portfolio”. can you explain me please?
thank you very much.
Thomas
The key is to use a "List (Text)" or "Term reference" field
Hi, Mato. I defined the options as a "List (Text)" or "Term reference" field -- I forget which -- with the drop-down widget. In the View, I then added a filter for that field and exposed it.
It would be difficult for me to explain it better than that without screen shots, a video, or face-to-face training. Good luck!
Tom Geller * Oberlin * San Francisco * TomGeller.com
Author/Presenter, Drupal video series at lynda.com
Creator of materials for Drupal-focused companies
taxonomy terms and search term
I used taxonomy terms and search term, then tick Expose this filter to visitors.