Extend Search control
I can not find the possibility to add more elements (fields/listboxes) to the existing search control. I'm building a website which has Cooking Recipes.
- The recipes are news items.
- These items are shown in the newslist.
- Each item has tags like: 1) 4 persons, 2) 30 minutes, 3) dessert.
- It is currently possible to search within these news items with 1 searchbox
- I want to have 3 selectboxes (for example: 1) number of persons, 2) minutes, 3) type of dish) with each containing the values (tags) of all recipes (news items).
- Under these 3 selectboxes there is the search button.
- After clicking on this button I want to see the newslist being filtered after a page refresh.
If someone can solve this, I'll be very grateful!...
You can expose your search criteria as a custom dynamic fields. Then you can build a custom widget that will look into these fields and return the proper result.
Please take a look at
Thank you for your reply. Do you perhaps have a sample?
I do not have a sample for this specific requirement. It requires custom development.
the Telerik team
Maybe as a feature request the search could be extended to have mulitple indexes searched on some Dropdownbox settings (for starters)
So one could create an search index for all pages under starting node help (if that works) and one for the whole site for example. This would enable the user quickly search help or rest of site.
I logged your feature request for further implementations.
the Telerik team
I have an other solution.
In the news section I have created 3 custom fields which needs to be indexed.
And I have created 3 static selectboxes (values corresponding to the custom fields). in the search template, The value of from each selected item will be combined and filled in the search textbox above the search button. For example, the value of the search textbox will be filled in with "mega tower 1978".
When this text is filled in the "Content" it works, but for some reason when using the 3 custom fields it doesn't find anything.
Below are the fields that are included in the pipe