QueryDataSource

Abstract

This topic describes the QueryDataSource component in SPEAK.

You use the QueryDataSource component to retrieve Sitecore items, using a Sitecore Query or a Sitecore Fast Query.

Name

Description

Default

Appearance

Formatting

Specify a formatting token:

  • $convert_date_to_friendly_format: convert internal date format to localized format

  • $send_localized_dates: send localized versions of all dates

  • $convert_id_to_display_name: convert item IDs to the display names of the items

You can enter multiple formats as a pipe-separated (“|”) list.

Data

Database

Specify the database that Sitecore queries:

  • The exact name of a database, for example “core”, or “master”.

  • $context_database: context database.

  • $context_contentdatabase: content database.

The context database

Fields

You can provide a pipe-separated (“|”) list of field names or IDs that Sitecore retrieves. If you enter an asterix, “*”, Sitecore retrieves all fields. Retrieve as few fields as possible to improve performance.

If you do not enter anything, all fields are retrieved.

IsBusy

This read-only property is True when the QueryDataSource component is busy retrieving items.

Items

Contains the retrieved items. You normally bind to this property from a control that can display items, for example, the ListControl control.

Language

Specify the language version of the items you want to search in:

  • Empty: search in all languages.

  • $context_language: search in current language from the CMS

  • Exact language: for example: "ja-jp" or "en-us"

All languages

Query

Specify a Sitecore Query or a Sitecore Fast Query.

Paging

PageIndex

The component does not use this property.

PageSize

The component does not use this property.

Configuration

You can create a configuration item for a QueryDataSource component by creating an item based on the QueryDataSource Parameters template.

The configuration item has these specific fields:

  • Query

  • IsBusy

  • Items

It inherits these fields:

  • Database

  • Fields

  • PageSize

  • PageIndex

  • Language

  • Behaviors

  • Id