The Smart search filter web part can be used to enable users limit the range of documents that will be searched, or define how the search results will be sorted. It is designed to be connected to Smart search dialog or Search dialog with results. You can connect more than one filter to these web parts.
You can see an example of how this works on the sample Corporate Site, on the Examples -> Web parts -> Full-text search -> Smart search filter page. You can see three Smart search filters connected to a Smart search dialog, which is connected to Smart search results.
The behaviour of the smart search filter is mainly defined by the properties explained in the table below. You can find descriptions of all the web part's properties in Kentico CMS Web Parts reference or after clicking the Documentation link at the top right corner of the web part properties window.
Property Name |
Description |
||||||||||
Filter is conditional |
If true, the filter limits the searched documents (where condition). If false, the filter determines the sorting of search results (sort condition). |
||||||||||
Search webpart ID |
ID of the Smart search dialog or Smart search dialog with results web part to which the filter is connected. |
||||||||||
Values |
Using this property, you can specify the possible filter options that can be selected using the filter. You enter one option per line in format: <index field name>;<value of the field>;<displayed text>
Examples:
|
||||||||||
Query name |
Name of a query which can be used instead of the Values property to dynamically create the filter options. The query must return three columns, which will be used in the following order: <index field name>,<value of the field>,<displayed text>
Sample query to load all document types as the filter options: SELECT TOP 1000 '+classname', ClassName, ClassDisplayName FROM CMS_Class WHERE ClassIsDocumentType = 1 |
Page url: http://devnet.kentico.com/docs/devguide/index.html?smart_search_filter.htm