Render a navigation to previous/next blog entries on the
FrontPage
Parameters
- SKIP: initial offset
- LIMIT: number of items per page
- MAX: maximum number of items
- PARAMS: additional url parameters (optional)
Implementation
%STARTINCLUDE%
~~~
<!--
<noautolink>
%CALC{"$SET(theNextSkip,$EVAL(%SKIP%+%LIMIT%))$SET(thePrevSkip,$EVAL(%SKIP%-%LIMIT%))$IF($GET(thePrevSkip)<0,$SET(thePrevSkip,0))"}%
</noautolink>
-->
<div class="blogNavigation">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td class="blogPrev">
~~~ <a style="%CALC{"$IF(%SKIP%==0,display:none)"}%"
~~~ href="?skip=%CALC{"$GET(thePrevSkip)"}%;limit=%LIMIT%
*~~ %IFDEFINED{"%PARAMS%" then=";%PARAMS%"}%">
*~~ « previous page
~~~ </a>
</td>
<td class="blogNext">
~~~ <a style="%CALC{"$IF($GET(theNextSkip)>=%MAX%,display:none)"}%"
~~~ href="?skip=%CALC{"$GET(theNextSkip)"}%;limit=%LIMIT%
*~~ %IFDEFINED{"%PARAMS%" then=";%PARAMS%"}%">
*~~ next page »
~~~ </a>
</td>
</tr></table>
</div>
*~~
%STOPINCLUDE%
Test
Calls to 'RenderPageNavigation'