search
Use the <search> tag implements search functionality.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
class | String | N | Specify the CSS class name defined in the CSS field of the widget. |
itemPage | String | Y | Specify a path to a page in the portal structure. Example: itemPage="page" returns a URL of the search results page containing the page word https://your_instance_url/page?searchQuery |
itemView | String | N | Specify the view used for the search results page rendering. |
onChange | Function | N | Specify a function called when clicking the Search button. Set the attribute value to the custom s_widget_custom method created in the client script. |
placeholder | String | N | Define a placeholder for the search field. |
searchUrl | String | N | Specify the URL path that determines which page the user will be redirected to after clicking the Search button. |
searchQuery | String | N | Add a search bar initial value. |
showTitle | Boolean | N | Set the value to true to enable the title displaying. The default value is false. |
size | String | N | Specify the search bar size. Available values:
|
title | String | N | Define a custom title instead of the default one. To use a custom title, set the showTitle attribute to true first. |
top | Integer | N | Specify the number of first matches to display in the search autosuggestion. |
tsGroupId | String | N | Enter an ID of the table group to specify the search area. |
Example:
search
<search
tsGroupId="157018693719021198"
top="3"
size="lg"
itemPage="page"
itemView="Service Portal RO"
showTitle="true"
onChange="s_widget_custom.search(arguments[0]);"
></seach>
The template above displays the following search field on the page: