Services · Blog · Demo
Welcome, Registration, and other StartingPoints; TWiki history & Wiki style; All the docs...

RenderPageNavigation

Parameters

  • SKIP: initial offset
  • LIMIT: number of items per page
  • MAX: maximum number of items
  • PARAMS: additional url parameters (optional)

CSS

  • pageNavigation
  • pagePrev
  • pageNext

Implementation

%STARTINCLUDE%
~~~
<!--
<noautolink>
%CALC{"$SET(theNextSkip,$EVAL(%SKIP%+%LIMIT%))$SET(thePrevSkip,$EVAL(%SKIP%-%LIMIT%))$IF($GET(thePrevSkip)<0,$SET(thePrevSkip,0))"}%
</noautolink>
-->
<div class="pageNavigation">
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<td align="left" width="50%" class="pagePrev">
~~~ <a style="%CALC{"$IF(%SKIP%==0,display:none)"}%" 
~~~    href="?skip=%CALC{"$GET(thePrevSkip)"}%;limit=%LIMIT%
*~~    %IFDEFINED{"%PARAMS%" then=";%PARAMS%"}%">
*~~    &#171;&nbsp;previous
*~~ </a>
</td>
<td align="right" width="50%" class="pageNext">
~~~ <a style="%CALC{"$IF($GET(theNextSkip)>=%MAX%,display:none)"}%" 
~~~    href="?skip=%CALC{"$GET(theNextSkip)"}%;limit=%LIMIT%
*~~    %IFDEFINED{"%PARAMS%" then=";%PARAMS%"}%">
*~~    next&nbsp;&#187;
*~~ </a>
</td>
</tr></table>
</div>
*~~
%STOPINCLUDE%

Test

r0 - 30 Jan 2007 - 17:39:57 - TWikiContributor
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiRing? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.RenderPageNavigation
Syndicate this site RSSATOM