Function: RenderFrontTeaser

Render a set of teasers

see: RenderFullTeaser, RenderBlogTeaser, RenderFrontPage

Parameters

  • LIMIT: number of teasers, defaults to 5
  • CAT: categories to extract (optional)
  • TAG: tag to extract (optional)
  • AUTHOR: extract postings of this author (optional)

Implementation

%STARTINCLUDE%
<noautolink>
%~~ DBQUERY{
~~~      "TopicType=~'\bBlogEntry\b' AND State='published'
~~~       %IFDEFINED{"%CAT%" then="AND SubjectCategory=~'\b%CAT%\b'" glue="off"}%
~~~       %IFDEFINED{"%TAG%" then="AND BlogTag=~'\b%TAG%\b'" glue="off"}%
~~~       %IFDEFINED{"%AUTHOR%" then="AND BlogAuthor='%AUTHOR%'" glue="off"}%
~~~      "
~~~    web="%WEB%"
~~~    limit="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="5"}%"
~~~    order="created" reverse="on" hidenull="on"
~~~    format="%DBCALL{"RenderBlogTeaser" section="format" NAME="$topic"}%"
~~~ }%
%STOPINCLUDE%

Test

Calls to 'RenderFrontTeaser'