r1 - 12 Sep 2007 - 19:32:44 - TWikiGuestYou are here: CWiki >  Blogs Web > TopicFunction > RenderBlogArchive

Function: RenderBlogArchive

Renders the BlogArchive

This TopicFunction displays the mode selector. It then renders the archive depending on the MODE to RenderBlogArchiveChron, RenderBlogArchiveCat, RenderBlogArchiveTag or RenderBlogArchiveLex. These in turn display their specific means to select a search string: a tag, a category, a date or a lexical item. If this search string is passed to the blog archive's QUERY parameter a search is started on the blog and displayed using the RenderBlogArchiveHitList function.

Parameters

  • MODE: one of the modes chron, cat, tag or lex (optional)
  • QUERY: the item to be searched for in the archive, passed throuhg to the modes (optional)

Implementation

%STARTINCLUDE%
<div class="blogArchiveModes">
<span class="blogArchiveMode blogArchiveModeChron">
~~~ <a href="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?mode=chron" 
~~~    title="Browse the Archive in Chronological Order"
~~~    %IFDEFINED{"%MODE%" as="chron" then="class=\"current\"" glue="off"}%>
*~~   Chron
*~~ </a>
*~~ %REDDOT{"%BASEWEB%.RenderBlogArchiveChron"}%
</span> 
<span class="blogArchiveMode blogArchiveModeCat">
~~~ <a href="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?mode=cat" 
~~~    title="Browse the Archive by Category"
~~~    %IFDEFINED{"%MODE%" as="cat" then="class=\"current\"" glue="off"}%>
*~~   Cat
*~~ </a>
*~~ %REDDOT{"%BASEWEB%.RenderBlogArchiveCat"}%
</span>
<span class="blogArchiveMode blogArchiveModeTag">
~~~ <a href="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?mode=tag" 
~~~    title="Browse the Archive by Tag"
~~~    %IFDEFINED{"%MODE%" as="tag" then="class=\"current\"" glue="off"}%>
*~~   Tag
*~~ </a>
*~~ %REDDOT{"%BASEWEB%.RenderBlogArchiveTag"}%
</span> 
<span class="blogArchiveMode blogArchiveModeLex">
~~~ <a href="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?mode=lex" 
~~~    title="Browse the Archive by Lexical Analysis"
~~~    %IFDEFINED{"%MODE%" as="lex" then="class=\"current\"" glue="off"}%>
*~~   Lex
*~~ </a>
*~~ %REDDOT{"%BASEWEB%.RenderBlogArchiveLex"}%
</span> 
</div>
%IFDEFINEDTHEN{"%MODE%" as="cat"}%
%$nopDBCALL{"RenderBlogArchiveCat" QUERY="%QUERY%"}%
%ELSIFDEFINED{"%MODE%" as="tag"}%
%$nopDBCALL{"RenderBlogArchiveTag" QUERY="%QUERY%"}%
%ELSIFDEFINED{"%MODE%" as="lex"}%
%$nopDBCALL{"RenderBlogArchiveLex" QUERY="%QUERY%"}%
%ELSEDEFINED%
%$nopDBCALL{"RenderBlogArchiveChron" QUERY="%QUERY%"}%
%FIDEFINED%
%STOPINCLUDE%

Test

See BlogArchive

Calls to 'RenderBlogArchive'

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
 
CWiki
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding CWiki? Send feedback.