Render a double linked list to previous and next documents
Parameters
- NAME: topic name to which the prev-next doc navigation is displayed
- WHERE: search parameter to restrict the linked documents
- ORDER: criterion how to sort set of documents (created, name, ...)
- REVERSE: invert the sorting order (on, off)
- PARAMS: additional url parameters (optional)
Implementation
%STARTINCLUDE%
*~~
<div class="navigation">
<noautolink>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom:1em">
<tr>
<td valign="top">
*~~
%~~ PREVDOC{"%NAME%" web="%BASEWEB%"
~~~ where="%WHERE%"
~~~ order="%IFDEFINED{"%ORDER%" then="%ORDER%"}%"
~~~ reverse="%IFDEFINED{"%REVERSE%" then="%REVERSE%"}%"
~~~ format="«"
~~~ }%
*~~
</td>
<td valign="top" class="navPrev" width="50%">
~~~
%~~ PREVDOC{"%NAME%" web="%BASEWEB%"
~~~ where="%WHERE%"
~~~ order="%IFDEFINED{"%ORDER%" then="%ORDER%"}%"
~~~ reverse="%IFDEFINED{"%REVERSE%" then="%REVERSE%"}%"
~~~ format="<a href=\"%SCRIPTURLPATH{"view"}%/$web/$topic
*~~ %IFDEFINED{"%PARAMS%" then="?%PARAMS%"}%\"
~~~ accesskey=\"b\"
~~~ $percntDBQUERY{topic=\"$topic\" web=\"$web\"
~~~ format=\"title=\\"$expand(Summary)\\">$expand(Summary or Name)\"
~~~ }$percnt</a>"
~~~ }%
~~~
</td>
<td valign="top" class="navNext" width="50%" align="right">
~~~
%~~ NEXTDOC{"%NAME%" web="%BASEWEB%"
~~~ where="%WHERE%"
~~~ order="%IFDEFINED{"%ORDER%" then="%ORDER%"}%"
~~~ reverse="%IFDEFINED{"%REVERSE%" then="%REVERSE%"}%"
~~~ format="<a href=\"%SCRIPTURLPATH{"view"}%/$web/$topic
*~~ %IFDEFINED{"%PARAMS%" then="?%PARAMS%"}%\"
~~~ accesskey=\"f\"
~~~ $percntDBQUERY{topic=\"$topic\" web=\"$web\"
~~~ format=\"title=\\"$expand(Summary)\\">$expand(Summary or Name)\"
~~~ }$percnt</a>"
~~~ }%
~~~
</td>
<td valign="top">
*~~
%~~ NEXTDOC{"%NAME%" web="%BASEWEB%"
~~~ where="%WHERE%"
~~~ order="%IFDEFINED{"%ORDER%" then="%ORDER%"}%"
~~~ reverse="%IFDEFINED{"%REVERSE%" then="%REVERSE%"}%"
~~~ format="»"
~~~ }%
*~~
</td>
</tr>
</table>
</div>
*~~
%STOPINCLUDE%
Test
Calls to 'RenderDocNavigation'