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

Custom Search


Reply


6 Posts   2587 Views

Avatar
Alan Tucker

Community Member, 5 Posts

5 June 2009 at 3:36am

I have extended a cms page with four fields and finding its difficult to create a custom search which only searches these fields. Does any have any ideas or examples of a simple and easy implementation of a custom search?

Thanks in advance

Alan

Avatar
Hamish

Community Member, 712 Posts

5 June 2009 at 4:05pm

Edited: 05/06/2009 4:05pm

Have a look at search contexts:

[url]http://doc.silverstripe.org/doku.php?id=searchcontext[/url]

Avatar
klikhier

Community Member, 150 Posts

28 July 2009 at 8:34pm

Edited: 28/07/2009 8:34pm

With regards to [url]http://doc.silverstripe.org/doku.php?id=searchcontext[/url]:

Is there a way to set up SearchContext to search through more than one attribute, but WITHOUT creating a search field for every searchable attribute in the searchform. I would like to have just one search form input field that searches through 3 attributes using the SearchContext functionality.

Happy to hear!

Avatar
robinp

Community Member, 33 Posts

17 September 2009 at 6:50pm

Hi klikhier,

Just wondering if you figured this out ?

Cheers

Robin

Avatar
klikhier

Community Member, 150 Posts

17 September 2009 at 10:52pm

Nope, unfortunately...

Avatar
robinp

Community Member, 33 Posts

17 September 2009 at 10:58pm

Hi,

Actually thought more about what I'm trying to do and what you might want to do as well and I think more standard DataObject search is the way to go. SearchContext is easy but doesn't seem that flexible

Cheers

Robin