Decent Blogging using TWiki

Function: RenderArchives

Render a list of all months that have postings.

Parameters

Implementation

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

Test

Archive

1

Archive

Calls to 'RenderArchives'

TopicForm
TopicType: TopicFunction
TopicDescription: Render a list of all months that have postings.
r1 - 2006-02-01 - 17:54:47 - TWikiContributor
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.