<tml:foreach>

Description:
For all iterations. The content of this tag is issued for every value to be iterated. When iterated in a value list, the current value is available as taginfo="currentvalue" (that can be read with tml:taginfo). When iterating in content documents f.e. in a navigator or in an collection, the current content document besomes context of the current loop.
Attributes:
General WebTML attributes are hidden -> show general attributes
Name Value(s) Version Usage

Details:
Tag-Infos:
  • currentpage: number of the page currently displayes
  • pages: total number of available pages
  • currentvalue: current value of iteration (i.e. type="itemvalue|tagresult|level"), the current item value/value in day result/number of levels
  • haspreviouspage: boolean object that displays if there is a previous page (not applicable directly - instead use )
  • hasnextpage: boolean object that displays if there is a next page (not applicable directly - instead use )
  • startindex: index of the first value on the current page
  • endindex: index of the last value of the current page
  • count: total number of values to be displayed
  • iteration: current number of the iteration
Examples:

    <tml:foreach type="loop" count="26" currentvalue="c">

      <tml:evaluate var="char">
        @char(64+c)
      </tml:evaluate>
      <a href="javascript:search('<tml:item name="char"/>')"><tml:item name="char"/></a>
    </tml:foreach>

    <tml:collection>
      <tml:query type="fulltext">WGA</tml:query>
      <tml:foreach pagesize="20" sortexpression="this.date" sortorder="decsending" sortlanguage="tmlscript">
        <li><tml:link/></li>
      </tml:foreach>
    </tml:collection>