The SimplePie plugin is a fast and easy-to-use RSS and Atom feed parser.
- Download the zip file (or clone via git) and unzip it or clone the repo into
/_add-ons/
. - Ensure the folder name is
simplepie
(Github timestamps the download folder). - Enjoy.
{{ simplepie url="http://statamic.com/blog/feed" limit="5" cache="yes" }}
<h1><a href="{{ permalink }}">{{ title }}</a></h1>
<h2>Posted on {{ date }}</h2>
<div class="content">
{{ content }}
</div>
{{ /simplepie }}
The URL of the feed to be parsed.
url="http://statamic.com/blog/feed/"
default: yes
Order by date or default feed order.
Default: 10
Limit the number of items returned.
Default: 0
Offset the returned items. For example, if your feed returns
- Mustaches
- Corncob Pipes
- Musky Scent
Setting offset="1"
would return:
- Corncob Pipes
- Musky Scent
Default: no
Turn caching on for faster page loads or to limit API/Feed requests.
Default: 10 (seconds)
The maximum number of seconds to spend waiting to retrieve a feed.
Upon successfully retrieving a feed, the following default variables become available inside the {{ simplepie }}
tag pair.
- {{ title }}
- {{ permalink }}
- {{ date }}
- {{ update_date }}
- {{ author }}
- {{ category }}
- {{ description }}
- {{ content }}