Function: RenderArchives

Render a list of all months that have postings.

Parameters

  • CAT: render archive links in this SubjectCategory (optional)
  • AUTHOR: render archive the archive for this author (optional)

Implementation

%STARTINCLUDE%
*~~ 
%~~     DBSTATS{"TopicType=~'\bBlogEntry\b' AND State='published'
~~~         %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'" glue="off"}%
~~~         %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor=~'\b%AUTHOR%\b'" glue="off"}%
~~~       "
~~~       field="Date"
~~~       hidenull="on"
~~~       sort="created" reverse="on"
~~~       pattern="(\w+ \d\d\d\d)"
~~~       header="
~~~         <div class=\"blogSideBarSection blogSideBarArchive\">
~~~           <h1 class=\"blogSideBarHeader\"> Archive$percntREDDOT{\"%WEB%.%TOPIC%\"}$percnt</h1>
~~~           <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"
~~~       format="
~~~         <tr><td><ul style=\"margin-top:0px;margin-bottom:0px;\"><li>
~~~           <a href=\"%SCRIPTURLPATH{"view"}%/%WEB%/BlogArchive?mode=chron;
*~~                month=$percntENCODE{\"$key\"}$percnt\"
~~~              title=\"Archive of
~~~                %IFDEFINED{"%CAT%" then="<nop>%CAT% in" glue="off"}% $key\">
~~~             $key
~~~           </a></li></ul></td>
~~~           <td valign=\"top\" class=\"blogEntryCount\">$count</td>
~~~         </tr>"
~~~        footer="</table></div>"
~~~     }%
%STOPINCLUDE%

Test

Calls to 'RenderArchives'

TopicForm
TopicType TopicFunction
TopicDescription Render a list of all months that have postings.