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

---++ Parameters
   * QUERY: search string
   * PARAMS: url params to pass through to the pagination

---++ Implementation
<verbatim>
%STARTINCLUDE%
*~~
<div class="blogArchiveHitList">
<a name="hits"></a>
%~~ DBQUERY{"TopicType=~'\bBlogEntry\b' AND State='published' %QUERY%"
~~~   %IFDEFINED{"%URLPARAM{"skip"}%" then="skip=\"$test\""}%
~~~   limit="15"
~~~   order="created" 
~~~   reverse="on"
~~~   hidenull="on"
~~~   header="<div style=\"text-align:center;padding:2em;\"><table>"
~~~   format="<tr>
~~~     <td style=\"padding-left:1em;\" align=\"right\"> $index </td>
~~~     <td style=\"padding-left:1em;\" align=\"right\"> <span style=\"white-space:nowrap\">$formatTime(createdate,'$day $mon $year')</span> </td>
~~~     <td style=\"padding-left:1em;\" align=\"left\" width=\"100%\"> [[$web.$topic][$formfield(Headline)]]$percntREDDOT{\"$web.$topic\"}$percnt 
*~~       &nbsp;$percntCOUNTCOMMENTS{\"$web.$topic\" hidenull=\"on\" format=\"($dollarcount)\"}$percnt </td>
~~~     </tr>"
~~~   footer="</table>$percntDBCALL{\"RenderPageNavigation\" 
~~~      SKIP=\"%URLPARAM{"skip" default=" 0"}%\" 
~~~      MAX=\"$count\"
~~~      LIMIT=\"15\"
~~~      PARAMS=\"%PARAMS%\"
~~~   }$percnt</div>"
~~~ }%
</div>
*~~
%STOPINCLUDE%
</verbatim>

<!-- interrupt glue -->

---++ Test
See BlogArchive.

%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="Render the search result in the BlogArchive"}%
