We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi All,

    I am building a directory of businesses ( lets say ) and was wondering if there is a RSS solution out there in the Modx wild that will add any new pages to the feed.

    Basically each business is a new page, so I would like it if someone subscribed to a rss feed and I added a new business ( page ) under any category it would be pulled in by the RSS feed.

    Cheers for any pointers

    PS: I develope websites for a living but have never touched RSS feeds so consider me a newbe grin
      • 1343 ☆ A M B ☆
      • 2,213 Posts
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 22840
        • 1,572 Posts
        Quote from: AMDbuilder at Sep 10, 2009, 03:37 PM

        This might help get you started: http://ditto.modxcms.com/tutorials/custom-rss-feed.html or http://wiki.modxcms.com/index.php/Basic_RSS_feed
        Thanks for the links but I don’t think any of them will do what I require, really dont want to add extra ditto feeds etc.

        I think I might just go down the line of running wordpress as a blog and pull in the RSS feed of that and just update that on every new business.

        Pitty there’s no simple way to do it within modx though as wordpress would have done everything I needed plus the rss but I love modx so decided to go with this.

        maybee time for a re think sad
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          You want any new pages/businesses to be published on an RSS feed... Those two links both tell you how to accomplish just that or am I missing something here?

          AMDbuilder
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 20413
            • 2,877 Posts
            Yes! Each new page (document a.k.a resource) you create with this ditto call
            is a new feed.

            Alias: NAME-OF-FEED.rss
            Use in <head> for the pages you link the new feed:
            <link rel="alternate" type="application/rss+xml" title="My other RSS-Feed" href="NAME-OF-FEED.rss" />
              @hawproductions | http://mrhaw.com/

              Infograph: MODX Advanced Install in 7 steps:
              http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

              Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
              http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
              • 22840
              • 1,572 Posts
              OK looks like I wasn’t reading it right last night so I’ll start again undecided

              I have followed the steps in the first link to a t and can view the RSS page, however when I create a new article it is not showing in the feed ( the feed has no content ), Have I missed something ??

              Thanks both for your time.

              Paul
                • 20413
                • 2,877 Posts
                Check:
                Content type: xml
                Template: blank
                Published: YES

                Check:
                That the Ditto calls a container that do have published resources.
                  @hawproductions | http://mrhaw.com/

                  Infograph: MODX Advanced Install in 7 steps:
                  http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

                  Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
                  http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
                  • 22840
                  • 1,572 Posts
                  OK This is getting me a bit confused so heres what I did.

                  Created a chunk with the following and called it ditto_rss_tpl :
                  <item>  
                  <title>[+rss_pagetitle+]</title>  
                  <link>[(site_url)][~[+id+]~]</link>  
                  <description><![CDATA[ [+content+] ]]></description>  
                  <pubDate>[+rss_date+]</pubDate>  
                  <guid isPermaLink="false">[(site_url)][~[+id+]~]</guid>  
                  <dc:creator>[(site_name)]</dc:creator>  [+tagLinks+] </item> 


                  Then created a page with the following ditto call,
                  [!Ditto? &format=`rss` &tpl=`ditto_rss_tpl`!]


                  the page is named [(site_name)] Feed, it uses the blank template, it is published and has type text/xml.

                  Now when I goto that page it is desplaying like a rss feed but without content from new docs in it, I’ve got to have missed something but have no idea what.

                  Check:
                  That the Ditto calls a container that do have published resources.

                  I want / need the rss to display all new content not just from 1 container, is that possible ??
                    • 22840
                    • 1,572 Posts
                    OK got it, needed to add the &parent.

                    Now next question

                    I need to exclude docs which I can do using &filter=`id,11,2|id,12,2|id,13,2` however I need to still display pages under these pages, is there a way to do it.

                    Thanks for the help
                      • 22840
                      • 1,572 Posts
                      Woo hooooooo,

                      Sorted.

                      Instead of excluding the documents I can get round it by telling it multiple containers to grab from which is much easier as these will never change so the call is now:

                      [!Ditto? &format=`rss` &tpl=`ditto_rss_tpl` &parents=`10, 37, 38 ,39, 40, 41, 42, 43, 44`!]


                      Thanks for all the help grin