AVR32 Linux Developer Blog

Function: RenderFrontPage

Render a set of BlogEntries

see: RenderFullTeaser, RenderBlogTeaser, RenderFrontTeaser, RenderPageNavigation

Parameters

  • SKIP: offset into the archive
  • LIMIT: number of postings to show maximal
  • CAT: categories to extract
  • AUTHOR: extract postings of this author

Implementation

%STARTINCLUDE%
~~~
%~~ DBQUERY{
~~~   "TopicType=~'\bBlogEntry\b' AND State='enabled' 
~~~    %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'" glue="off"}%
~~~    %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor=~'\b%AUTHOR%\b'" glue="off"}%
~~~   "
~~~   limit="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="5"}%" 
~~~   skip="%IFDEFINED{"%SKIP%" then="%SKIP%" else="0"}%" 
~~~   order="created" reverse="on" web="%WEB%" 
~~~   format="%DBCALL{"RenderFullTeaser" section="format" NAME="$topic"}%"
~~~   footer="
*~~      $percntDBCALL{\"$web.RenderPageNavigation\"
~~~        LIMIT=\"%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="5"}%\" 
~~~        SKIP=\"%IFDEFINED{"%SKIP%" then="%SKIP%" else="0 "}%\" 
~~~        MAX=\"$count\"
~~~      }$percnt
*~~   "
~~~ }%
~~~ %DBCALL{"RenderBlogAuthorSwitch"}%
~~~
%STOPINCLUDE%

Test

Calls to 'RenderFrontPage'

TopicForm
TopicType: TopicFunction
TopicDescription: Render a set of BlogEntries
r1 - 2005-11-29 - 19:07:40 - 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.