CompositeResults - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.7
Category
Reference Guide

This widget displays AFS search results with a high level of customization.

It is based on the composite mechanism.

For more information about composite mechanism, see Composite mechanism.

CompositeResults - Displays AFS search results with a high level of customization.

Parameter

Type

Card

Default

Description

includeFeeds

List of String

Optional

Empty list

The list of feeds the widget must display. It not set, it will display results of all feeds.

excludeFeeds

List of String

Optional

Empty list

The list of feeds the widget must ignore. If not set, result from all feeds will be displayed.

insertPageMarkers

Boolean

Optional

false

Insert an extra element between results to indicate a page change (only used if infinite scrolling is activated in the global Configuration).

As this widget is a composite one, it takes its components declaration inside its body. See Results Components for available components.

The following examples assumes the reply contains the following feeds with the URIs:

  • A
  • B
  • C
  • D

  • Example 1, when neither includefeeds nor excludefeeds is specified, the widget applies to all the feeds:

<!-- Display the results of all the feeds -->
<div class="AFSWidget" title="CompositeResults">
<div class="AFSWidgetResultComponent" title="Title"></div>
<div class="AFSWidgetResultComponent" title="Abstract"></div>
</div>

  • Example 2:

<!-- Display the results of the feed whose URI is D -->
<div class="AFSWidget" title="CompositeResults">
<script type="application/json">
{
"includeFeeds": [ "D" ]
}
</script>
<div class="AFSWidgetResultComponent" title="Title"></div>
<div class="AFSWidgetResultComponent" title="Abstract"></div>
</div>

  • Example 3, when both includeFeeds and excludeFeeds are specified, the widgets applies to the intersection of the feeds included and those excluded (here, the widget will display results of feeds C and D):

<!-- Display the results of the feeds with URI C and D -->
<div class="AFSWidget" title="CompositeResults">
<script type="application/json">
{
"includeFeeds": [ "A", "B", "C", "D" ],
"excludeFeeds": [ "A", "B" ]
}
</script>
<div class="AFSWidgetResultComponent" title="Title"></div>
<div class="AFSWidgetResultComponent" title="Abstract"></div>
</div>