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

---++ Parameters
   * NAME: name of the BlogPage to be used

---++ Implementation
<verbatim>
%STARTINCLUDE%
%~~ DBQUERY{topic="%NAME%" web="%WEB%"
~~~   format="%DBCALL{"%TOPIC%" section="format"}%"
~~~ }%
%STOPINCLUDE%
</verbatim>

---++ Format
<verbatim>
%STARTSECTION{"format"}%
*~~ <div class=\"blogPageHeadline\">
~~~   <h1>$formfield(Headline)$percntREDDOT{\"$web.$topic\"}$percnt</h1>
~~~ </div>
~~~ <div class=\"blogInfo\">
~~~   <span class=\"blogDate\">
~~~     $formatTime(createdate, '$day $mon $year - $hour:$minute')
~~~   </span>
~~~     $percntFORMATLIST{\"$formfield(SubjectCategory)\" sort=\"on\"
~~~       header=\"in <span class=\\"blogCategory\\">\"
~~~       format=\"<a href=\\"%SCRIPTURLPATH{"view"}%/$web/$1\\" rel=\\"tag\\">$1</a>\"
~~~       footer=\"</span>\"
~~~     }$percnt
~~~   <span class=\"blogAuthor\">by [[$web.$formfield(BlogAuthor)][$formfield(BlogAuthor)]] </span> 
~~~   $n
~~~ </div>
*~~
%ENDSECTION{"format"}%
</verbatim>

<!-- interrupt glue -->

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%" NAME="TestBlogPage1"}%
</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="Render the header of a BlogPage"}%
