atomic-result-template
atomic-result-template
This is for:
DeveloperThe atomic-result-template
component determines the format of the query results, depending on the conditions that are defined for each template. A template
element must be the child of an atomic-result-template
, and either an atomic-result-list
or atomic-folded-result-list
must be the parent of each atomic-result-template
.
Note: Any <script>
tags defined inside of a <template>
element will not be executed when results are being rendered.
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
|
A function that must return true on results for the result template to apply. For example, a template with the following condition only applies to results whose |
|
|
|
|
|
The field and values that define which result items the condition must be applied to. For example, a template with the following attribute only applies to result items whose |
|
|
|
|
The field and values that define which result items the condition must not be applied to. For example, a template with the following attribute only applies to result items whose |
|
|
Methods
getTemplate
Gets the appropriate result template based on conditions applied.
Signature: getTemplate() => Promise<ResultTemplate<DocumentFragment> | null>
Returns: Promise<ResultTemplate<DocumentFragment> | null>