The SearchPanel Config template
You use the SearchPanel Config template to create a search configuration item for the SearchDataSource component. You point the SearchDataSource component to the search configuration item in the SearchConfigItemId property.
You can create several search configuration items that retrieve items in different ways. You can then let users select between these different searches dynamically. For example, you can:
-
Create a search configuration item based on the SearchPanel Config template for each different search.
-
Configure each of these items.
-
Bind the SearchConfigItemId property of the SearchDataSource component to the search configuration item that specifies the primary search. Users see the result of this search when they load the page.
-
Provide navigation to additional searches. For example, you can create buttons and set the Click property like this:
set:<name of the data source>({"searchConfig": <item ID of config item})
Remember to create navigation back to the primary search so users can return to it after using another search.
The SearchPanel config template contains these fields:
| Field | Description |
|---|---|
| DisplayText | Not used. |
| Search | Specify the search query string. |
| AppendSearchText | If True, SPEAK concatenates the search string from the Search field to the common search string. If False, SPEAK replaces the common search string with the string from the Search field. |
| Root | Point to the item in the content tree that you want the search to start from. |
| Template | Specify the ID of a template, and the query only retrieves items based on this template. |
| Base Templates | Specify the names of base templates, and the query only retrieves items based on these base templates. |
| UpdatedWithin7Days | If True, the query only retrieves items updated within the last seven days. |
| CreatedWithin7Days | If True, the query only retrieves items created within the last seven days. |
| UpdatedByCurrentUser | If True, the query only retrieves items updated by the current user. |
| UpdatedBySpecificUser | If you specify the name of a user, the query only retrieves items updated by that user. |
| CreatedByCurrentUser | If True, the query only retrieves items created by the current user. |
| CreatedBySpecificUser | If you specify the name of a user, the query only retrieves items created by that user. |
| Sorting | Specify a sorting string similar to the one you use in the Sorting field of the SearchDataSource component.. For example, "aPath|dType". |