Function: RenderBlogArchiveChron

Renders the BlogArchive in CHRON mode

Parameters

  • QUERY: the item to be searched for in the archive

Implementation

%STARTINCLUDE%
*~~
%STOPALIASAREA%
<noautolink>
*~~
<div class="blogArchiveDateSelect">
<div class="blogArchiveYears">
%~~ DBSTATS{"TopicType=~'\bBlogEntry\b' AND State='published'
~~~   %IFDEFINED{"%URLPARAM{"year"}%" then="AND Date=~'$test'" glue="off"}%
~~~   "
~~~   field="Date" sort="created" 
~~~   pattern="(\d\d\d\d)"
~~~   format="
~~~     <span class=\"blogArchiveYear\">
~~~       <a href=\"%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?mode=chron;year=$key\"
~~~          class=\"$percntCALC{\"$IF($EXACT(%URLPARAM{"year"}%,$key),current)\"}$percnt\"
~~~       >$key</a>
~~~     </span>"
~~~ }%
</div>
<div class="blogArchiveMonths">
%~~ DBSTATS{"TopicType=~'\bBlogEntry\b' AND State='published'
~~~   %IFDEFINED{"%URLPARAM{"year"}%" then="AND Date=~'$test'" glue="off"}%
~~~   %IFDEFINED{"%URLPARAM{"month"}%" then="AND Date=~'$test'" glue="off"}%
~~~   "
~~~   field="Date" sort="created" 
~~~   pattern="(\w+) \d\d\d\d"
~~~   format="
~~~     <span class=\"blogArchiveMonth\">
~~~       <a href=\"%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%?
*~~          mode=chron;month=$key;year=%URLPARAM{"year" default=".*"}%\"
~~~          class=\"$percntCALC{\"$IF($EXACT(%URLPARAM{"month"}%,$key),current)\"}$percnt\"
~~~       >$key</a>
~~~     </span>"
~~~ }%
</div>
</div>
%~~ DBCALL{"RenderBlogArchiveHitList" 
~~~   QUERY="
*~~    %IFDEFINED{"%URLPARAM{"year"}%" then="AND Date=~'$test'" glue="off"}%
~~~    %IFDEFINED{"%URLPARAM{"month"}%" then="AND Date=~'$test'" glue="off"}%
*~~   "
~~~   PARAMS="
*~~     mode=chron;
*~~     month=%URLPARAM{"month" default=".*"}%;
*~~     year=%URLPARAM{"year" default=".*"}%
*~~   "
~~~ }%
*~~
</noautolink>
%STARTALIASAREA%
*~~
%STOPINCLUDE%

Test

See BlogArchive

Calls to 'RenderBlogArchiveChron'