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?
&url=`https://sls.gmu.edu/faculty-news/feed/`
&tpl=`RSSFeedParser`
&limit=`1`
]]
The code pulls the RSSFeedParser, a custom chunk we made that pulls the most recent article title and link.
Titles are pulled using:
[[+title]]
Links are pulled using:
[[+link]]
Here is a list of other data fields that may be pulled from the RSS Feed, if available:
- title – The title of the post.
- link – A direct link to the post.
- description – The description of the post.
- pubdate – The date the post was published.
- guid – The GUID of the post.
- author – The name of the author of the post.
- category – Any tags or category associations the post has.
- summary – A short summary of the post.
- date_timestamp – The timestamp of the post.
Like most MODx variables, wrap the data fields with double square brackets, but be sure to use the + sign prefix rather than the * symbol.