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

see also: RenderFullTeaser

---++ Parameters
   * NAME: BlogEntry topic name

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

---+++ Format
<verbatim>
%STARTSECTION{"format"}%
*~~ <div class=\"blogEntry\">
~~~ %STOPALIASAREA% <noautolink>
~~~   <table class=\"blogHeadline\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">
~~~   <tr><td>
~~~   <h2>
~~~     <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic\" 
~~~       title=\"permalink to <nop>$topic\">
~~~       $formfield(Headline)
~~~     </a>$percntREDDOT{\"$web.$topic\"}$percnt
~~~   </h2></td>
~~~   <td class=\"blogCommentCount\">
~~~     $percntCOUNTCOMMENTS{\"$web.$topic\" hidenull=\"on\" 
~~~       format=\"<a href=\\"$dollarpercntSCRIPTURLPATH{\\"view\\"}$dollarpercnt/
*~~         $web/$topic#topComment\\" title=\\"comments on <nop>$topic\\">
~~~         $dollarcount</a>\"
~~~     }$percnt
~~~   </td></tr></table>$n
~~~   <div class=\"blogInfo\">
~~~     <span class=\"blogDate\">
~~~       $percntTIMESINCE{
~~~          \"$expand(createdate)\"
~~~          format=\"$time ago\"
~~~          null=\"about now\"
~~~       }$percnt
~~~     </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>
~~~   </div>
~~~   </noautolink> %STARTALIASAREA%
~~~   <div class=\"blogText\">$n
~~~      <noautolink>$n
~~~      $formfield(Teaser)
~~~      <div class=\"blogMore\"> &#8230;&nbsp;
*~~        <a href=\"$percntSCRIPTURLPATH{\"view\"}$percnt/$web/$topic\" 
~~~           title=\"permalink to <nop>$topic\">more</a>
~~~      </div>
~~~      </noautolink>$n
~~~   </div>
~~~   %STOPALIASAREA%
~~~   <br clear=\"all\" />
~~~ </div>
%ENDSECTION{"format"}%
</verbatim>

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%" NAME="TestBlogEntry0"}%
</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="Render a teaser for a BlogEntry"}%
