I’ve been using the RSS output format, and come across a couple of little issues
1) In rss.format.inc.php, each <item> has an output of [+tags+]. When rendered as XML, it just shows ’None’, but this is not within any XML tags, which causes the feed to fail validation
2) It is outputting <language>english</language> - it should be outputting <language>en</language>, or again, the feed fails validation. The logic around line 11 seems slightly flawed - changing it to
$rss_placeholders['[+rss_lang+]'] = $_lang['abbr_lang'];
gives the correct output, and makes the RSS validate. This probably isn’t ideal, but was the easiest way I could get it to work correctly.
3) It would be great to be able to specify an XSL page, so the feed can look nice. It was fairly easy to add in:
After the line:
$rss_placeholders['[+rss_charset+]'] = isset($charset) ? $charset : $modx->config['etomite_charset'];
add
$rss_placeholders['[+rss_xsl+]'] = isset($xsl) ? $modx->config['site_url']."[~$xsl~]" : '';
And after the line
<?xml version="1.0" encoding="[+rss_charset+]" ?>
add
<?xml-stylesheet type="text/xsl" href="[+rss_xsl+]"?>
You can then add another parameter to your Ditto call with the doc ID for the XSL:
where obviously the document uses a blank template and text/xml headers.