OpenWGA 7.4 - WebTML reference
WebTML tags » url<tml:url type="nextpage | previouspage | selectpage" >
Purpose:
Creates an url which allows paging over the pages of a <tml:foreach> tag.
Description:
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.
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.
Value(s):
nextpage|previouspage|selectpage
Examples:
Example for using next-, previouspage:
Example for type="selectpage":
<ul>
<tml:foreach id="docs" pagesize="10">
<li><tml:link/>
<tml:foreach>
</ul>
<tml:case haspreviouspage="docs">
<a href="<tml:url type="previouspage" sourcetag="docs"/>">Zurück</a>
</tml:case>
<tml:case hasnextpage="docs">
<a href="<tml:url type="nextpage" sourcetag="docs"/>">Vor</a>
</tml:case>
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>
</tml:foreach>