AVR32 Linux Developer Blog

Function: RenderRecentPostings

Render the list of recent postings in the WebSideBar

Parameters

  • LIMIT: maximal number of BlogEntries to list
  • CAT: optionally render restrict list to this category

Implementation

%STARTINCLUDE%
~~~ %STOPALIASAREA%
%~~ DBQUERY{"TopicType=~'\bBlogEntry\b' AND
~~~   State='enabled'
~~~   %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'"}%"
~~~  order="createdate" reverse="on" limit="%LIMIT%" 
~~~  hidenull="on"
~~~  header="<div class=\"blogSideBarSection blogSideBarLatest\">
~~~    <table class=\"blogSideBarHeader\" 
~~~           border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">
~~~      <tr><td>
~~~        <h1>
*~~          Latest$percntREDDOT{\"%WEB%.%TOPIC%\"}$percnt
*~~        </h1>
*~~      </td><td align=\"right\">
*~~        <a class=\"natFeedIcon\"
~~~           title=\"RSS Feed for the Entries on this Site\"
~~~           href=\"%SCRIPTURL{"view"}%/%WEB%/WebRss\">RSS</a>
*~~      </td></tr>
*~~    </table><ul style=\"margin-top:0px;margin-bottom:0px;\"><noautolink>"
~~~  format="<li><a href=\"%SCRIPTURL{"view"}%/$web/$topic\"
~~~            title=\"permalink to <nop>$topic\">
*~~            $formfield(Headline)</a></li>"
~~~  footer="</noautolink></ul></div>"
~~~ }%
~~~ %STARTALIASAREA%
~~~
%STOPINCLUDE%

Test

Calls to 'RenderRecentPostings'

TopicForm
TopicType: TopicFunction
TopicDescription: Render the list of recent postings in the WebSideBar
r1 – 2005-11-09 – 18:21:03 – 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.