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

---++ Parameters
   * AUTHOR: restrict list to pages done by this author (optional)

---++ Implementation
<verbatim>
%STARTINCLUDE%
~~~ %STOPALIASAREA%
%~~ DBQUERY{"TopicType=~'\bBlogPage\b' AND (form!='Blog(Page|Entry)Form' OR State='published')
~~~      %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor=~'\b%AUTHOR%\b'" glue="off"}%"
~~~   hidenull="on"
~~~   header="<noautolink><div class=\"blogSideBarSection blogSideBarPages\">$n
~~~           <h1 class=\"blogSideBarHeader\">Pages$percntREDDOT{\"%WEB%.%TOPIC%\"}$percnt</h1><ul>"
~~~   format="<li><a href=\"%SCRIPTURLPATH{"view"}%/$web/$topic\"
~~~                  title=\"permalink to $topic\">
*~~                 $expand(Headline or TopicDescription)
*~~           </a> </li>"
~~~   footer="</ul></div></noautolink>"
~~~ }%
~~~ %STARTALIASAREA%
~~~
%STOPINCLUDE%
</verbatim>

<!-- interrupt glue -->

---++ Test
<div class="alt">
%DBCALL{"%TOPIC%"}%
</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="Renders a list of BlogPages put into the sidebar"}%
