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

---++ Parameters
   * NAME: topic name of a BlogComment or BlogEntry

---++ Implementation
<verbatim>
%STARTINCLUDE%
*~~
%~~ DBQUERY{topics="%NAME%" separator="none"
~~~    format="$expand(Nr and '.')"
~~~  }%
*~~ 
%~~ DBQUERY{"TopicType='BlogComment' AND BlogRef='%NAME%'" 
~~~    format="none" separator="none"
~~~    header="$percntCALC{\"$EVAL($count+1)\"}$percnt$n*~~"
~~~ }%
*~~
%STOPINCLUDE%
</verbatim>

---++ Test
<div class="alt">
&lt;%DBCALL{"%TOPIC%" NAME="TestBlogEntry0"}%&gt;
</div>

<div class="alt">
&lt;%DBCALL{"%TOPIC%" NAME="BlogComment18"}%&gt;
</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="Compute the next comment nr given a current BlogEntry or BlogComment"}%
%META:TOPICMOVED{by="MichaelDaum" date="1127748248" from="Blog.RenderCommentNr" to="Blog.RenderNextCommentNr"}%
