We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25323
    • 17 Posts
    Hi everyone (newb, first post, be gentle, etc) ...

    I’ve installed Ditto and got it working to publish news on my site. Now I would like to know how to get this news generated into an RSS feed? - What is the correct Ditto snippet code I should be using to get this working??!!

    Thanks smiley
    Rob
      • 18397
      • 3,250 Posts
      Just use the same call you are using for news with &format=`rss` on a page that has the content type text/xml.
        • 25323
        • 17 Posts
        Hi Mark ... thanks for your reply. Unf I’ve had no luck sad

        So here’s what I did, created a new document using the blank template set the content type to text/xml as per the page settings. I then inserted
        [[Ditto? &startID=`6` &format='rss' ]]
        into the document content, published saved and ... an error:

        XML Parsing Error: junk after document element
        Location: http://localhost/modx/index.php?id=28&z=manprev
        Line Number 9, Column 5: <div class="ditto_summaryPost">

        Have I got this all wrong? Any pointers would be much appreciated!
          • 25663 MODX Staff
          • 12,272 Posts
          don’t use single-quotes, use backticks around &format=`rss`
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 25323
            • 17 Posts
            Wow... that fixed it - and a few other issues I was having as well. And to think my hours of frustration were caused by using single quotes in place of back-ticks!

            Thanks heaps, Ryan smiley