{"id":841,"date":"2018-11-26T19:04:43","date_gmt":"2018-11-26T19:04:43","guid":{"rendered":"http:\/\/sls.gmu.edu\/web\/?p=841"},"modified":"2018-11-26T19:14:13","modified_gmt":"2018-11-26T19:14:13","slug":"setting-up-an-rss-feed-parser-in-modx","status":"publish","type":"post","link":"https:\/\/sls.gmu.edu\/web\/2018\/11\/26\/setting-up-an-rss-feed-parser-in-modx\/","title":{"rendered":"Setting up an RSS Feed Parser in MODX"},"content":{"rendered":"<p>MODX uses an add-on called <a href=\"https:\/\/docs.modx.com\/extras\/revo\/getfeed\" rel=\"noopener\" target=\"_blank\">getFeed<\/a> to parse RSS content.<\/p>\n<p>In order to use it, place this code on your page template (example uses the Faculty News Feed):<\/p>\n<p><code><br \/>\n[[!getFeed?<br \/>\n   &url=`https:\/\/sls.gmu.edu\/faculty-news\/feed\/`<br \/>\n   &tpl=`RSSFeedParser`<br \/>\n   &limit=`1`<br \/>\n]]<\/code><\/p>\n<p>The code pulls the RSSFeedParser, a custom chunk we made that pulls the most recent article title and link. <\/p>\n<p>Titles are pulled using:<\/p>\n<p><code>[[+title]]<\/code><\/p>\n<p>Links are pulled using:<\/p>\n<p><code>[[+link]]<\/code><\/p>\n<p>Here is a list of other data fields that may be pulled from the RSS Feed, if available:<\/p>\n<ul>\n<li><strong>title<\/strong> &#8211; The title of the post.<\/li>\n<li><strong>link<\/strong> &#8211; A direct link to the post.<\/li>\n<li><strong>description<\/strong> &#8211; The description of the post.<\/li>\n<li><strong>pubdate<\/strong> &#8211; The date the post was published.<\/li>\n<li><strong>guid<\/strong> &#8211; The GUID of the post.<\/li>\n<li><strong>author<\/strong> &#8211; The name of the author of the post.<\/li>\n<li><strong>category<\/strong> &#8211; Any tags or category associations the post has.<\/li>\n<li><strong>summary<\/strong> &#8211; A short summary of the post.<\/li>\n<li><strong>date_timestamp<\/strong> &#8211; The timestamp of the post.<\/li>\n<\/ul>\n<p>Like most MODx variables, wrap the data fields with double square brackets, but be sure to use the + sign prefix rather than the * symbol.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MODX uses an add-on called getFeed to parse RSS content. In order to use it, place this code on your page template (example uses the Faculty News Feed): [[!getFeed? &#038;url=`https:\/\/sls.gmu.edu\/faculty-news\/feed\/` &#038;tpl=`RSSFeedParser` &#038;limit=`1` ]] The code pulls the RSSFeedParser, a custom chunk we made that pulls the most recent article title and link. Titles are pulled &hellip; <a href=\"https:\/\/sls.gmu.edu\/web\/2018\/11\/26\/setting-up-an-rss-feed-parser-in-modx\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Setting up an RSS Feed Parser in MODX&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4,11],"tags":[],"class_list":["post-841","post","type-post","status-publish","format-standard","hentry","category-cms","category-web-development"],"_links":{"self":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/comments?post=841"}],"version-history":[{"count":0,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/841\/revisions"}],"wp:attachment":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/media?parent=841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/categories?post=841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/tags?post=841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}