OpenWGA 7.8 - WebTML reference

WebTML tags » url

<tml:url type="nextpage | previouspage | selectpage" >


Creates an url which allows paging over the pages of a <tml:foreach> tag.


By using the attribute "pagesize" on <tml:foreach> the output is split into multiple pages. Each page of the foreach can be accessed by url parameters. Links to these pages are generated by this <tml:url> type.

The <tml:foreach> tag for the paging is specified by the attribute "sourcetag".

type="nextpage" will generate an url the the next page of the foreach.

type="previouspage" will generate an url to the previous page of the foreach.

type="selectpage" can be used to reference a page directly. The page number is specified by the attribute "page".

This URL type does automatically include all parameters that were given to the current request on the generated URL. So attribute keepparams is ineffective here.




Example for using next-, previouspage:

    <tml:foreach id="docs" pagesize="10">

<tml:case haspreviouspage="docs">
    <a href="<tml:url type="previouspage" sourcetag="docs"/>">Zurück</a>
<tml:case hasnextpage="docs">
    <a href="<tml:url type="nextpage" sourcetag="docs"/>">Vor</a>

Example for type="selectpage":
<tml:foreach type="loop" count="{ taginfo('docs', 'pages') }" currentvalue="page">
    <a href="<tml:url type="selectpage" sourcetag="docs" page="{page}"/>">
        <tml:item name="page"/>
    </a> &nbsp;