About Data Sources

A Data Source is a "back-end" component that provides the Teaser and View Picker widgets with a means of retrieving content items from the Content Engine.

A Data Source provides a "client" widget with a simple ordered collection of content items, so all the client widget needs to do is select the required number of content items from the collection, and present them in the required way. All the logic needed to select the content items and sort them into the required order is provided by the Data Source.

There are two different types of Data Source:

External

An external Data Source is an independently defined component. It is created in exactly the same way as a widget. However, since it only retrieves data and does not have a widget's presentation capabilities, there is in general no point placing it in a template. Instead, you make use of a Data Source in a Teaser or View Picker widget by dropping it on the widget's External Data Source field as a related content item. You can use one such Data Source in many different widgets. There are two other ways an external Data Source can be used:

  • Editorial staff can use external data sources directly by placing them on section pages. A data source used in this way behaves in much the same way as a content item list. For further information about this use of data sources, see Desked Data Sources in the Widget Framework User Guide.

  • In one special case, an external data source can be placed directly in a template — in a Gallery group's Data Source area. When used in this way, the data source is accessible to any Teaser widget or View Picker widget widgets that are placed in the same Gallery group. For further information about this use of data sources, see ?? in the Widget Framework User Guide.

Embedded

An embedded Data Source is, as its name implies, not independently defined but embedded inside its client widget. It is configured by editing the Embedded Data Source definition form displayed on the client widget's Data Source tab. An embedded Data Source can only be used by its client widget.

A Teaser or View Picker widget cannot have both an external and an embedded Data Source. The first field on a widget's Data Source tab is the Use field, which must be set to Embedded Data Source, External Data Source or Template Data Source. If External Data Source or Template Data Source is selected, then the embedded data source editor on the Datasource tab is of no interest to the user and is therefore not displayed. To enable display of the embedded data source editor, set Use to Embedded Data Source.

The Data Source component is very powerful and flexible. It allows you to define multiple queries that can select content items using a variety of different methods. You can, for example:

  • Select the content items desked in a specified group on the current section page

  • Select the current content item's related content items

  • Select content items that are tagged with the same tags as the current content item

  • Select content items based on data returned by the Escenic Analysis Engine (the most read content items, for example)

  • Select content items using a free text search

The results returned by the queries you define are merged into a single collection that you can filter and sort in various ways to produce the final list of content items. This merged collection contains only unique content items, with no duplicates.