r1 - 31 Aug 2006 - 15:09:44 - TWikiGuestYou are here: CWiki >  _BlogPlugin Web > TopicFunction > RenderFrontTeaser

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'

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.