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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

Search and Sort: How to?


Go to End


2 Posts   880 Views

Avatar
pinkp

Community Member, 182 Posts

25 April 2013 at 12:15am

I just need a little guidance as to the correct way to achieve the following.
I am creating a "Members Directory" (not members who have log in etc just a separate membership list).

Basically in the CMS you will add a "Member" they will have name, website, discipline, about paragraph, image.

1> Then what I need to know is how in the front end these can be sorted Alphabetically, and also the option to sort by Discipline.
2> How can i create a search just for these members, i.e. I search for "john smith poet" and this will filter the results.

Currently looking at:
http://api.silverstripe.org/3.0/class-SearchContext.html
http://doc.silverstripe.org/framework/en/reference/modeladmin
http://blog.fraser-hart.co.uk/silverstripe-3-gridfield-with-many_many-relationship/#comment-1182
http://www.ssbits.com/tutorials/2011/sorting-on-a-related-dataobject-in-modeladmin/
http://doc.silverstripe.org/framework/en/topics/datamodel
http://doc.silverstripe.org/framework/en/tutorials/5-dataobject-relationship-management
http://doc.silverstripe.org/framework/en/tutorials/4-site-search

Avatar
swaiba

Forum Moderator, 1899 Posts

25 April 2013 at 12:50am