%META:TOPICINFO{author="TWikiContributor" date="1135113209" format="1.1" version="1.1"}%
%META:TOPICPARENT{name="TopicFunction"}%
---+ Function: %TOPIC%
%FORMFIELD{"TopicDescription"}%

---++ Parameters
   * SKIP: topic offset
   * LIMIT: number of hits per page

---++ Implementation
<verbatim>
%STARTINCLUDE%
*~~
%~~ DBQUERY{
~~~    order="modified" 
~~~    limit="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="10"}%" 
~~~    reverse="on" 
~~~    skip="%SKIP%"
~~~    header="<noautolink>$n
~~~      | *&nbsp;* | *Topic* | *Type* | *Changed* | *Author* |"
~~~    format="
~~~      | $index 
~~~      | [[$web.$topic][$topic]] 
~~~      | $percntFORMATLIST{\"$formfield(TopicType)\" sort=\"on\" format=\"[[$web.$1][$1]]\"}$percnt
~~~      |  <span style=\"white-space:nowrap\">$formatTime(info.date)</span>  |  [[%MAINWEB%.$expand(info.author)][$expand(info.author)]]  |$n
~~~      | &nbsp; | <div style=\"margin:2px 10px 5px 0px;\">$flatten($expand(Teaser or Headline or TopicDescription or Text or 'no description')) </div>||||"
~~~    footer="$percntCALC{\"$dollarSET(nrTopics,$count)\"}$percnt$n</noautolink>"
~~~ }%
%~~ DBCALL{"RenderPageNavigation" 
~~~   SKIP="%SKIP%" 
~~~   MAX="%CALC{"$GET(nrTopics)"}%"
~~~   LIMIT="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="10"}%"
~~~ }%
*~~
%STOPINCLUDE%
</verbatim>

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%" SKIP="%URLPARAM{"skip" default=" 0"}%" LIMIT="5"}%
</div>

%DBCALL{"RenderFunctionCallers"}%

<!--
   * Set ALLOWTOPICCHANGE = %MAINWEB%.BlogAdminGroup
   * Set SIDEBAR = Admin
   * Set SIDEBARARG = TopicFunction
-->


%META:FORM{name="TopicForm"}%
%META:FIELD{name="TopicType" attributes="M" title="TopicType" value="TopicFunction"}%
%META:FIELD{name="TopicDescription" attributes="M" title="TopicDescription" value="Replacement for TWiki's default WebChanges"}%
