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

---++ Parameters
   * CAT: reduce the blogroll to BlogLinks in the given SubjectCategory (optional)
   * NOCAT: exclude BlogLinks which are in this SubjectCategory (optional)
   * AUTHOR: display the blogroll of the given author (optional)
   * TITLE: string describing this blogroll, defaults to "Blogroll"

---++ Implementation
<verbatim>
%STARTINCLUDE%
~~~
%~~ DBQUERY{"TopicType=~'\bBlogLink\b' 
~~~     %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'" glue="off"}%
~~~     %IFDEFINED{"%NOCAT%" then="AND !(SubjectCategory=~'\b%NOCAT%\b')" glue="off"}%
~~~     %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor=~'\b%AUTHOR%\b'" glue="off"}%"
~~~   web="%WEB%"
~~~   order="Name" hidenull="on"
~~~   header="<div class=\"blogSideBarSection blogSideBarAggregations\"><noautolink>
~~~     <h1 class=\"blogSideBarHeader\">
*~~       %IFDEFINED{"%TITLE%" then="%TITLE%" else="Blogroll"}%
*~~       $percntREDDOT{\"%WEB%.%TOPIC%\"}$percnt</h1><ul>"
~~~   format="<li>
~~~      $percntIFDEFINEDTHEN{\"$formfield(Feed)\" glue=\"off\"}$percnt
~~~        <a href=\"%SCRIPTURLPATH{"view"}%/$web/$topic
*~~           %IFDEFINED{"%CAT%" then="?cat=%CAT%"}%\"
~~~           title=\"$formfield(Headline)\">$formfield(Name)</a>
~~~      $percntELSEDEFINED$percnt
~~~        <a href=\"$formfield(Url)\"
~~~           title=\"$formfield(Headline)\">$formfield(Name)</a>
*~~        $percntREDDOT{\"$web.$topic\"}$percnt
~~~      $percntFIDEFINED$percnt </li>"
~~~   footer="</ul></noautolink></div>"
~~~ }%
*~~
~~~
%STOPINCLUDE%
</verbatim>

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

<div class="alt">
%DBCALL{"%TOPIC%" CAT="BlogUp" TITLE="BlogUp Ring"}%
</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 the list of BlogLinks in the sidebar"}%
%META:TOPICMOVED{by="MichaelDaum" date="1130170326" from="Blog.RenderAggregations" to="Blog.RenderBlogRoll"}%
