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

---++ Parameters
   * CAT: name of a SubjectCategory
   * LIMIT: number of postings per page
   * SKIP: offset into the archive

---++ Implementation
<verbatim>
%STARTINCLUDE%
*~~
<h1 style="margin-bottom:0px;padding-bottom:0px">%CAT%</h1>
<div class="blogArchiveDescription">
  %DBQUERY{topics="%CAT%" format="$expand(TopicDescription)<p />$expand(Comment)"}% 
</div>
%~~ DBCALL{"RenderFrontPage" 
~~~   %IFDEFINED{"%SKIP%" then="SKIP=\"%SKIP%\"" glue="off"}%  
~~~   %IFDEFINED{"%LIMIT%" then="LIMIT=\"%LIMIT%\"" glue="off"}%  
~~~   CAT="%CAT%"
~~~ }%
*~~ 
%STOPINCLUDE%
</verbatim>

---++ Test
<div class="alt">
%~~ DBCALL{"%TOPIC%" 
~~~   CAT="BlogDev" 
~~~   LIMIT="%URLPARAM{"limit" default="2"}%"
~~~   SKIP="%URLPARAM{"skip" default="0"}%"
~~~ }%
</div>

%DBCALL{"RenderFunctionCallers"}%

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


%META:FORM{name="TopicForm"}%
%META:FIELD{name="TopicType" attributes="M" title="TopicType" value="TopicFunction"}%
%META:FIELD{name="TopicDescription" attributes="M" title="TopicDescription" value="Renders a set of BlogEntry teasers in a SubjectCategory"}%
