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

---++ Parameters
   * NAME: name of TopicType which we render a button for
   * FORM: TWikiForm to be used when creating a topic
   * TEMPLATE: TopicTemplate to be used 

---++ Implementation
<verbatim>
%STARTINCLUDE%
~~~
<div class="twikiPageForm blogAdminButtons">
<form action="%SCRIPTURLPATH{"edit"}%/%WEB%" method="post">
<input type="hidden" name="onlywikiname" value="on" />
%IFDEFINEDTHEN{"%TEMPLATE%"}%
<input type="hidden" name="templatetopic" value="%TEMPLATE%" />
%FIDEFINED%
%IFDEFINEDTHEN{"%FORM%"}%
<input type="hidden" name="formtemplate" value="%FORM%" />
%FIDEFINED%
<input type="hidden" name="TopicType" value="%NAME%" />
<input type="hidden" name="TopicDescription" value="" />
<input type="hidden" name="topicparent" value="%NAME%" />
<input type="submit" value="New <nop>%NAME%" class="blogSubmitButton" />
<input type="text" name="topic" size="40" />
</form> 
</div>
~~~
%STOPINCLUDE%
</verbatim>

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%" NAME="TopicType"}%
</div>

%DBCALL{"RenderFunctionCallers"}%

<!--
   * Set ALLOWTOPICCHANGE = %MAINWEB%.BlogAdminGroup
   * Set ALLOWTOPICVIEW = %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="Renders a form that allows generate a new topic of the given type"}%
