r1 - 12 Sep 2007 - 19:32:44 - TWikiGuestYou are here: CWiki >  Blogs Web > RenderAtom

Function: RenderAtom

Render rss an feed

See also: RenderRss, WebSyndication

Parameters

  • SEARCH: expression used to extract the items
  • LIMIT: number of items to include
  • TITLE: channel title
  • TEASEONLY: if defined only the Teaser will be shown, otherwise the full Text also

Implementation

%STARTINCLUDE%
*~~
<title>%TITLE%</title>
<subtitle type="html">%SITEMAPWHAT%</subtitle>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created" reverse="on" 
~~~   limit="1"
~~~   format="<updated>
*~~     $formatTime(info.date, '$year-$mo-$dayT$hour:$minute:$secondZ')
*~~     </updated>"
~~~ }%
*~~
<link rel="self" type="application/atom+xml"
~~~ href="%SCRIPTURL{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%" />
<link rel="alternate" type="text/html"
~~~ hreflang="%LANGUAGES{format="$langtag" separator=","}%" 
~~~ href="%SCRIPTURL{"view"}%/%INCLUDINGWEB%/%INCLUDINGTOPIC%" />
%IFDEFINED{"%WEBLOGOIMG%" then="<logo>%WEBLOGOIMG%</logo>"}%
<generator uri="%SCRIPTURL{"view"}%/%TWIKIWEB%/BlogPlugin">
  TWiki %WIKIVERSION%, <nop>BlogPlugin %PLUGINVERSION{"BlogPlugin"}%
</generator>
<id>
*~~ tag:%HTTP_HOST%,%SERVERTIME{"$year-$mo-$day"}%:%INCLUDINGWEB%.%INCLUDINGTOPIC%
*~~ </id>
<rights>%WEBRSSCOPYRIGHT%</rights>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created" reverse="on" 
~~~   limit="%LIMIT%"
~~~   format="
*~~     <entry>$n
*~~       <title>
*~~         $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"BlogComment\" glue=\"off\"}$percnt
~~~           $expand(Name) replies on 
~~~           \"<a href=\"%SCRIPTURL{"view"}%/view/$web/$expand(BaseRef)\">
*~~             $expand(@BaseRef.Headline)
*~~           </a>\"
~~~         $percntELSEDEFINED$percnt
~~~           $expand(Headline or Name or name)
~~~         $percntFIDEFINED$percnt
*~~       </title>$n
*~~       <link rel=\"alternate\" type=\"text/html\" 
~~~         href=\"%SCRIPTURL{"view"}%/$web/$topic\" />$n
*~~       <id>
*~~         tag:%HTTP_HOST%,$formatTime(info.date, '$year-$mo-$day'):$web.$topic
*~~       </id>$n
*~~       <updated>
*~~         $formatTime(info.date, '$year-$mo-$dayT$hour:$minute:$secondZ')
*~~       </updated>$n
*~~       <published>
*~~         $formatTime(createdate, '$year-$mo-$dayT$hour:$minute:$secondZ')
*~~       </published>$n
*~~       <content type=\"xhtml\">$n
*~~         <div xmlns=\"http://www.w3.org/1999/xhtml\">
*~~           $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"BlogComment\" glue=\"off\"}$percnt
~~~           $expand('<b>' and Headline and '</b>')
~~~           $percntFIDEFINED$percnt
~~~           $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"TWikiTopic\" glue=\"off\"}$percnt
~~~             $expand(TopicDescription) 
~~~           $percntFIDEFINED$percnt
~~~           $expand(Teaser) 
~~~           $percntIFDEFINEDTHEN{\"%TEASEONLY%\"}$percnt
~~~           $percntELSEDEFINED$percnt
~~~             <p />$expand(Text)<!-- -->$n<!-- -->
~~~           $percntFIDEFINED$percnt
~~~         </div>$n
*~~       </content>$n
*~~       <author>$n
*~~         <name>$expand(BlogAuthor or Name)</name>$n
*~~         $percntIFDEFINEDTHEN{\"$expand(Url)\"}$percnt
*~~           <uri>$test</uri>$n
*~~         $percntELSEDEFINED$percnt
*~~           <uri>%SCRIPTURL{"view"}%%MAINWEB%/$expand(BlogAuthor)</uri>$n
*~~         $percntFIDEFINED$percnt
*~~       </author>$n
*~~       <category term=\"$expand(SubjectCategory)\" label=\"$expand(SubjectCategory)\" />$n
*~~       <contributor>$n
*~~         <name>$expand(info.author)</name>$n
*~~       </contributor>$n
*~~     </entry>"
~~~ }%
*~~
%STOPINCLUDE%

Calls to 'RenderAtom'

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.