Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

letting agent website search system


Reply

5 Posts   385 Views

Avatar
lozhowlett

29 October 2011 at 12:26am Community Member, 146 Posts

Hi everyone

I am building a letting agent website, which will have properties on it. I have made the admin system page for it, no problem there. What I need some pointing in the right direction on is how I search on fields like "Number of beds" and price per month from the front end?

Are there any tutorials on this sort of thing, or would you go about it?

Thanks in advance

Avatar
swaiba

29 October 2011 at 1:30am Forum Moderator, 1796 Posts

Not a specfic tutrial that I know of, but if you take a look at building a From with the stuff you'd like to search by, then putting that in the session and redirecting to a page that displays results. Then add pagination.

Avatar
lozhowlett

29 October 2011 at 1:38am Community Member, 146 Posts

i suppose what i would really like to know if how to

- post data to something that will listen to it
- how to query the database based on the input from the form
- then display a result set

I am sure there must be some generic tutorials somewhere on getting stuff out of the DB?

Avatar
swaiba

29 October 2011 at 3:25am Forum Moderator, 1796 Posts

does this help?

http://doc.silverstripe.org/sapphire/en/tutorials/3-forms
http://www.ssbits.com/tutorials/2010/paginating-a-filtered-dataobjectset/

Avatar
lozhowlett

1 November 2011 at 12:13am Community Member, 146 Posts

thanks, thats pointed me in the right direction! :)