Deliver overview lists per RSS-stream (Content-Syndication)Author: Dr. Frank Hoffmann, 2003/04/30 A RSS-conform XML file shall be generated out of ZMS objects of a certain content node. For this purpose a new DTML method at the level of the display templates is set up which generates a TOC-list acc. to RSS-DTD (see links below). The mechanism is shown by means of a simple basic structure. Solution: The following DTML method generates an XML-stream introduced by the RSS-typical channel element. Then comes the definition of the entry node and an iterative listing with the filteredChildNodes function. <dtml-call expr="RESPONSE.setHeader('content-type', 'text/xml')">
<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>medvalue.news</title>
<description>Aktuelle Themen aus dem medvalue-Netzwerk</description>
<language>de</language>
<link>http://medvalue.net</link>
<copyright>(c)2003 HOFFMANN+LIEBENBERG</copyright>
<!-- beispielhafter Einstiegsknopten content.e83 //-->
<dtml-with "content.e83">
<dtml-in "filteredChildNodes(REQUEST,PAGES,)">
<item>
<title><dtml-var "getTitle(REQUEST)"></title>
<description><dtml-var "getObjProperty('attr_dc_description',REQUEST)"></description>
<link><dtml-var "getHref2IndexHtml(REQUEST)"></link>
<dc:creator><dtml-var "getObjProperty('attr_dc_creator',REQUEST)"></dc:creator>
<dc:date><dtml-var "getLangFmtDate(getObjProperty('change_dt',REQUEST),
'eng','ISO-8601')"></dc:date>
</item>
</dtml-in>
</dtml-with>
</channel>
</rss>Comment: [howto@/support/content/e732/e736/e780/e1368][getObjProperty]: key=howto_comment References:
|
Home |
Sitemap |
Printversion |
Top |
Imprint |
pressinfo
© 2001-2008 Hoffmann+Liebenberg GmbH, SNTL Publishing GmbH & Co KG
|
ZMS is a partner project of medvalue.net