You mean like demonstrated on
this website?
This is one way to do it:
1. Create a new template called RSS. Use a variant of the following code:
<?xml version="1.0" encoding="[(modx_charset)]" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xml:lang="(yams_tag)">
<channel>
<atom:link href="(yams_doc:[*id*])" rel="self" type="application/rss+xml" />
<title>[*pagetitle*]</title>
<link>(yams_site:[*id*])</link>
<description>[*introtext*]</description>
<language>(yams_tag)</language>
<copyright>Copyright ..., 2009</copyright>
<docs>http://www.rssboard.org/rss-specification</docs>
<ttl>1440</ttl>
<image>
<url>[(site_url)]assets/images/...</url>
<title>[*pagetitle*]</title>
<link>(yams_site:[*id*])</link>
<width>...</width>
<height>...</height>
</image>
[*content*]
</channel>
</rss>
Replace occurrences of ... with your
- copyright, and
- image location and dimensions where appropriate. (Alternatively, leave out the image block.)
2. Go to Modules > YAMS > Multilingual Templates, specify the newly created RSS template as multilingual and select Update.
3. Create a chunk called RSS_item with something like the following content:
<item>
<title><![CDATA[ [+longtitle+] ]]></title>
<link>(yams_doc:[+id+])</link>
<description><![CDATA[ [+introtext+] ]]></description>
<pubDate><![CDATA[ [+date+] ]]></pubDate>
<guid isPermaLink="true">(yams_doc:[+id+])</guid>
</item>
3. Create a new document.
- Change the template to RSS.
- Give it an appropriate alias (or aliases) - myfeed.rss, for example.
- Make it cacheable
- Set the content type to application/rss+xml
- In each of the content fields for each language, place the following ditto call:
[!Ditto? &parents=`...` &language=`(yams_mname)` &tpl=`RSS_item` &depth=`1` &dateSource=`editedon` &dateFormat=`%a, %d %b %Y %H:%M:%S GMT` &display=`all` &showInMenuOnly=`0` &seeThruUnpub=`0` &filter=`type,reference,2|searchable,1,1` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php`!]
where ... should be replaced by the folder containing the feed documents. The ditto call will search one level deep and the filter ensures that only non-weblink documents that are searchable are included. (You can change this if you like.)
- Publish it.