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

see: RenderFullTeaser, RenderBlogTeaser, RenderFrontPage

---++ Parameters
   * LIMIT: number of teasers, defaults to 5
   * CAT: categories to extract (optional)
   * TAG: tag to extract (optional)
   * AUTHOR: extract postings of this author (optional)

---++ Implementation
<verbatim>
%STARTINCLUDE%
<noautolink>
%~~ DBQUERY{
~~~      "TopicType=~'\bBlogEntry\b' AND State='published'
~~~       %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'" glue="off"}%
~~~       %IFDEFINED{"%TAG%" then="AND BlogTag=~'\b%TAG%\b'" glue="off"}%
~~~       %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor='%AUTHOR%'" glue="off"}%
~~~      "
~~~    web="%WEB%"
~~~    limit="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="5"}%"
~~~    order="created" reverse="on" hidenull="on"
~~~    format="%DBCALL{"RenderBlogTeaser" section="format" NAME="$topic"}%"
~~~ }%
%STOPINCLUDE%
</verbatim>

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%" LIMIT="3" CAT="BlogDev"}%
</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="" title="TopicDescription" value="Render a set of teasers"}%
