1. Component library

The SearchPanel Config template

Version:

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})

Note

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:

FieldDescription
DisplayTextNot used.
SearchSpecify the search query string.
AppendSearchTextIf 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.
RootPoint to the item in the content tree that you want the search to start from.
TemplateSpecify the ID of a template, and the query only retrieves items based on this template.
Base TemplatesSpecify the names of base templates, and the query only retrieves items based on these base templates.
UpdatedWithin7DaysIf True, the query only retrieves items updated within the last seven days.
CreatedWithin7DaysIf True, the query only retrieves items created within the last seven days.
UpdatedByCurrentUserIf True, the query only retrieves items updated by the current user.
UpdatedBySpecificUserIf you specify the name of a user, the query only retrieves items updated by that user.
CreatedByCurrentUserIf True, the query only retrieves items created by the current user.
CreatedBySpecificUserIf you specify the name of a user, the query only retrieves items created by that user.
SortingSpecify a sorting string similar to the one you use in the Sorting field of the SearchDataSource component.. For example, "aPath|dType".
If you have suggestions for improving this article, let us know!