ss:ajax:delayedload ss:ajax:event ss:ajax:region ss:data:calendar ss:data:column ss:data:repeater ss:data:table ss:data:tree ss:forms:captcha ss:forms:checkbox ss:forms:codeeditor ss:forms:combobox ss:forms:datepicker ss:forms:daterange ss:forms:dialogbox ss:forms:editbox ss:forms:fileupload ss:forms:fileuploadimage ss:forms:form ss:forms:hidden ss:forms:money ss:forms:officeuseregion ss:forms:option ss:forms:password ss:forms:paymentmethod ss:forms:radiobutton ss:forms:row ss:forms:searchbox ss:forms:selectlist ss:forms:signature ss:forms:slider ss:forms:spinbox ss:forms:submitbutton ss:forms:submitimage ss:forms:submitlink ss:forms:textarea ss:forms:timepicker ss:layout:rotator ss:layout:stepper ss:layout:stepperpanel ss:layout:tablist ss:layout:tablistitem ss:logic:dependency ss:logic:parse ss:logic:if ss:logic:else ss:logic:include ss:logic:template ss:logic:variable ss:navigation:breadcrumbs ss:navigation:item ss:navigation:primary ss:navigation:secondary ss:personalisation:firstname ss:personalisation:fullname ss:personalisation:lastname ss:personalisation:other ss:regions:content ss:regions:contentadditional ss:regions:security ss:regions:togglable ss:standard:audio ss:standard:embed ss:standard:icon ss:standard:image ss:standard:label ss:standard:link ss:standard:script ss:standard:video ss:templates:column ss:templates:row ss:templates:section ss:templates:teammember ss:thirdparty:googlemap ss:thirdparty:googlemapmarker
.
.
.

<ss:data:repeater> </...>

Repeaters are similar to a foreach loop. Allows iteration over a set of data, rendering HTML.

Content

any
Defines the template for each repetition of the repeater. Access the datasource content through the variable named in the as attribute to render the content in the datasource.

Attributes

as
string
The name of the variable to be registered for each row. For example, as="myvar" will let you reference $myvar inside the control.
classRow
string
The CSS class for rows (<tr> tags).
dataFilter
array
A Filter Array, if datasource is a function that supports a Properties Array.
dataJoins
array
Array of tables to join with, if datasource is a function that supports a Properties Array.
dataLimit
int
The maximum number of results to return, if datasource is a function that supports a Properties Array.
dataSearch
string
Filter results if they match this string, if datasource is a function that supports a Properties Array.
dataSourceSupportsOrdering
bool
Sets whether the DataSource supports the order parameter.

When set to true, an order parameter will be appended to the data. The order parameter is an array containing values similar to: array(array('contact_id', 'desc'), ...).
dataSourceSupportsPaging
bool
Sets whether the DataSource supports the paging parameters.

When set to true, two parameters will be appended to the call to the DataSource which represent the start and limit values of pagination.
dataStart
int
The number of results to skip, if datasource is a function that supports a Properties Array.
emptyMessage
string
The message shown when there are no rows in the data control.
exportable
bool
If true, an 'Export Data' link will appear beneath the control which will save a CSV file to the client of all the data in the control. Default = false.
height
mixed
Sets the height of the element. The default units are pixels. include the percentage symbol % to user percentage values.
id
string
Give this control a unique id. Can be accessed in the client DOM (eg, document.getElementById('myid'), or in the server DOM using $myid or $('myid')).
keyAs
string
The name of the variable to be registered for each row's key. For arrays of entities from the database (for example getAll()), the keys will be incrementing integers starting at 0.
paging
bool
Whether to enable paging for this control. With paging enabled, the initial number of results will be limited to the value of pagingrows, and a 'Show More' button will appear. Each click of the button will append pagingrows more rows. Default = false.
pagingRows
int
Use in conjunction with paging, to control the initial number of rows to be shown, and the number of rows loaded when 'Show More' is clicked. Default = 25.
populateAt
string
Sets when to populate from the datasource. Not required for most tasks, but can resolve timing issues on very complicated pages. Default = 'init'. Other possible values: 'render'.
width
mixed
Sets the width of the element. The default units are pixels. include the percentage symbol % to user percentage values.

Examples

Linking with PHP

How to call functions in Server Code from the data repeater.

XML Code:

PHP Code:


Run Example

Linking with Components

You can link the data repeater to components within the system to iterate over data. Refer to the documentation of the component for function calls and field names.

XML Code:

Debugging the data

You can always output the data contained in the registered variable by using varDump().

XML Code:

DataStart and DataLimit Attributes

Allows you to show from a record, to a record. Behaves like the LIMIT clause in SQL.

XML Code:

DataFilter Attribute

Allows you to specify conditions in your query. Behaves like the WHERE clause in SQL.

XML Code:

DataOrder Attribute

Allows you to specify conditions in your query. Behaves like the ORDER clause in SQL.

XML Code: