OpenWGA 7.11 - WebTML reference

WebTML tags » foreach

<tml:foreach sortorder ="ascending | descending">

Purpose:

Determines a sort order for the iteration output

Description:

Use it together with accompanying attributes sortitemsortmeta or sortexpression to determine how to sort the results.

Value(s):

ascending

descending

Default value:

ascending

Examples:

<tml:collection>
   <tml:query> ... </tml:query>
    <tml:foreach sortorder="acsending" sortexpression="this.TITLE">
        <li><tml:meta name="title"/></li>
    </tml:foreach>
</tml:collection>


Displays the collection ascending sorted by the document title.