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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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
Have a look at search contexts:
With regards to http://doc.silverstripe.org/doku.php?id=searchcontext:
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!
Hi klikhier,
Just wondering if you figured this out ?
Cheers
Robin
Nope, unfortunately...
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