OpenWGA 7.0 - WebTML reference

WebTML tags » foreach

<tml:foreach sortitem ="item | variable">

Purpose:

Sorts the iteration output by a content item

Description:

This is only valid with type="content".

Use this attribute together with sortorder. It specifies an item which should be available on the documents that are used by this tag. The output will be sorted by the natural sorting order of the items values.

Value(s):

Itemname which is found in all results.

Examples:

This example sorts the output by the values of the item "_customer_name" on the put out documents:

<tml:collection>

    <tml:query> ... </tml:query>
    <tml:foreach sortorder="ascending" sortitem="_customer_name">
    <li><tml:item name="_customer_name"/></li>
    </tml:foreach>
</tml:collection>