CMSDataList |
The CMSDataList control is inherited from the BasicDataList control.
It allows you to display part of the CMS content specified by its path, depth, document template, WHERE condition and ORDER BY clause. The CMSDataList control displays content without writing any additional code. Unlike CMSRepeater, the CMSDataList control allows you to display content in several columns.
Please note: If you want to display data using custom query, please use the QueryDataList control.
Data Source
Data retrieved using the SelectDocuments query of the specified document template.
Inherits: CMSDataProperties - common properties, BasicDataList See also: DataPager
Properties
Please note: you can find an example of datalist/repeater nesting in CMSRepeater chapter.
Design
The design can be modified in the same way as for the standard ASP.NET DataList control and by the transformations defined in the AlternatingTransformationName, TransformationName and SelectedItemTransformationName properties.
Example
This example will show you how to read a list of documents and display it using the repeater.
- ClassNames: cms.product - MaxRelativeLevel: -1 - OrderBy: ProductName - Path: /products/% - RepeatColumns: 2 - TransformationName: cms.product.preview - SelectedItemTransformationName: cms.product.default
Please note: as you defined TransformationName property, it's not necessary to define the standard ItemTemplate element of the DataList control.
|