{% component type: "module" %}
Component with required fields
{% component type: "module", source: "<moduleName>|<moduleId>", layout: "List 1" %}
Object param logic examples
Liquid function for modules (webapps in bc)
{% component type: "module", source: "<moduleName>|<moduleId>", object: "item", layout: "List 1" %}
List 1
<div>{{this.name}}</div> <div>{{this['Name']}}</div>
{% component type:"module", source:"<moduleName>|<moduleId>", object:"collection", layout:"List 2" %}
You can use {{counter}} tag in order to output incremental counter.
List 2
{% for item in this.items %} <div>{{ item.name }}</div> <div>{{item['Name']}}</div> {% endfor %}
- object - possible values are item or collection (the default is item).
The parameter specifies whether {{this}} object in the list layout be passed as a collection object or to a single item object. - type - the name of entity that needs to be used for the component retrieving function.
- source - an entity name or ID
- filterBy - "" - name of property to filter by. If Empty - do not use filtering for the list.
- filterValue - "" - value to filter by
- 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.