%META:TOPICINFO{author="TWikiContributor" date="1139409973" format="1.1" version="1.1"}%
%META:TOPICPARENT{}%
---+ Function: %TOPIC%
%FORMFIELD{"TopicDescription"}%

See also: RenderAtom, 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
<verbatim>
%STARTINCLUDE%
*~~
<channel rdf:about="%SCRIPTURL{"view"}%/%WEB%/WebRss">
  <title>%TITLE%</title>
  <link>%SCRIPTURL{"view"}%/%WEB%</link>
  <description>%SITEMAPWHAT%</description>
<image rdf:resource="%WEBLOGOIMG%" />
  <dc:language>en-us</dc:language>
  <dc:rights>%WEBRSSCOPYRIGHT%</dc:rights>
  <dc:publisher>%WIKIWEBMASTERNAME% [%WIKIWEBMASTER%]</dc:publisher>
  <dc:creator>%WIKIWEBMASTERNAME% [%WIKIWEBMASTER%]</dc:creator>
  <dc:source><nop>%WIKITOOLNAME%</dc:source>
  <items>
    <rdf:Seq>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created"  
~~~   reverse="on" limit="%LIMIT%" 
~~~   format="  <rdf:li rdf:resource=\"%SCRIPTURL{"view"}%/$web/$topic\" />"
~~~ }%
    </rdf:Seq>
  </items>
</channel>
<image rdf:about="%WEBLOGOIMG%">
  <title>TWiki/NatSkin</title>
  <link>%SCRIPTURL{"view"}%/%INCLUDINGWEB%</link>
  <url>%IFDEFINED{"%WEBLOGOIMG%" then="%WEBLOGOIMG%" else="%WIKILOGOIMG%"}%</url>
</image>
%~~ DBQUERY{"%SEARCH%" 
~~~   web="%INCLUDINGWEB%"
~~~   order="created" 
~~~   reverse="on" 
~~~   limit="%LIMIT%" 
~~~   separator="$n"
~~~   exclude="BlogAbout|WebHome"
~~~   format="
*~~     <item rdf:about=\"%SCRIPTURL{"view"}%/$web/$topic\">$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>%SCRIPTURL{"view"}%/$web/$topic</link>$n
~~~       <description>
*~~        $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"BlogComment\" glue=\"off\"}$percnt
~~~          $expand('&lt;b&gt;' and Headline and '&lt;/b&gt;')
~~~        $percntFIDEFINED$percnt
~~~        $encode(
~~~          $percntIFDEFINEDTHEN{\"$expand(TopicType)\" as=\"TWikiTopic\" glue=\"off\"}$percnt
~~~            $expand(TopicDescription)
~~~          $percntFIDEFINED$percnt
~~~          $expand(Teaser)
~~~          %IFDEFINED{"%TEASEONLY%" then=" " else="<p />$expand(Text)"}%
~~~          $percntIFDEFINEDTHEN{\"$expand(BlogTag)\" glue=\"off\"}$percnt
~~~            <p /><b>Tags</b>: 
~~~            $percntFORMATLIST{\"$test\" sort=\"on\"
~~~              format=\"<a href=\\"%SCRIPTURL{"view"}%/$web/BlogArchive?mode=tag&search=$1\\" 
~~~                          rel=\\"tag\\">$1</a>\"
~~~            }$percnt
~~~          $percntFIDEFINED$percnt)
~~~      </description>$n
~~~      <dc:creator>$expand(BlogAuthor or Name)</dc:creator>$n
~~~      <dc:date>$formatTime(createdate, '$year-$mo-$dayT$hour:$minute:$secondZ')</dc:date>$n
~~~      <dc:subject>$expand(SubjectCategory)</dc:subject>
~~~      <dc:contributor>$n
~~~        <rdf:Description link=\"%SCRIPTURL{"view"}%/Main/$expand(info.author)\">$n
~~~          <rdf:value>$expand(info.author)</rdf:value>$n
~~~        </rdf:Description>$n
~~~      </dc:contributor>$n
~~~   </item>
~~~ "}%
*~~
%STOPINCLUDE%
</verbatim>

%DBCALL{"RenderFunctionCallers"}%

<!--
   * Set ALLOWTOPICCHANGE = %MAINWEB%.BlogAdminGroup
   * Set SIDEBAR = Admin
   * Set SIDEBARARG = TopicFunction
-->


%META:FORM{name="TopicForm"}%
%META:FIELD{name="TopicType" attributes="M" title="TopicType" value="TopicFunction"}%
%META:FIELD{name="TopicDescription" attributes="M" title="TopicDescription" value="Render an RSS feed"}%
