OpenWGA 7.6 - WebTML reference

WebTML tags » foreach

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

Purpose:

Determines a sort order for the iteration output

Description:

While attribute sortorder triggers the sorting of iteration output it only determines the order of sorting.  Use it together with accompanying attributes sortitemsortmeta or sortexpression to determine how to sort the results.

Value(s):

ascending

descending

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.