Component with required fields

{% component type: "site_search", source: "<moduleName>|<moduleId>", layout: "Site Search List", displayPagination: "true" %}

Displays search results based on GET['SearchKeyword'] param.

Uses the layout of the module mentioned in source and layout params.

  • object - possible values are item or collection (the default is item).
  • The parameter specifies this object type in the layout (an item within hidden foreach loop or the collection of items).
  • whether the template content is used to render a collection or to render a single item.
  • type - the name of entity that needs to be used for the component retrieving function.
  • source - an entity name or ID
  • displayPagination - "true" - The flag that will determine either to display pagination for the list or not.
  • random - (true/false) displays a random item(s) from the list
  • limit - total number of items per page before pagination is used. Default is 10.
  • emptyMessage - The message that will be displayed if no results found by the query.
  • sortBy - (<property name>) will sort the items by the property
  • sortOrder - "ASC" or "DESC"
  • collectionVariable - the liquid variable name that will get the retrieved collection of the items.
  • layout - the layout name that needs to be used for rendering the component. If the parameter is blank than component will not be outputted since the is no layout.
  • <custom_named_param> - all name-value pairs of the parameters that are not specified above will be transferred as liquid variables inside the layout.