Skip to main content
Version: 1.21.3

search

Use the <search> tag implements search functionality.

Available attributes:

AttributeTypeMandatoryDescription
classStringNSpecify the CSS class name defined in the CSS field of the widget.
itemPageStringYSpecify 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
itemViewStringNSpecify the view used for the search results page rendering.
onChangeFunctionNSpecify a function called when clicking the Search button. Set the attribute value to the custom s_widget_custom method created in the client script.
placeholderStringNDefine a placeholder for the search field.
searchUrlStringNSpecify the URL path that determines which page the user will be redirected to after clicking the Search button.
searchQueryStringNAdd a search bar initial value.
showTitleBooleanNSet the value to true to enable the title displaying. The default value is false.
sizeStringNSpecify the search bar size. Available values:
  • lg (large)
  • sm (small)
titleStringNDefine a custom title instead of the default one.
To use a custom title, set the showTitle attribute to true first.
topIntegerNSpecify the number of first matches to display in the search autosuggestion.
tsGroupIdStringNEnter 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: