Skip to content

A fast and easy-to-use RSS and Atom feed parsing plugin for Statamic.

Notifications You must be signed in to change notification settings

rodebert/Plugin-SimplePie

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Statamic SimplePie Plugin

The SimplePie plugin is a fast and easy-to-use RSS and Atom feed parser.

Installing

  1. Download the zip file (or clone via git) and unzip it or clone the repo into /_add-ons/.
  2. Ensure the folder name is simplepie (Github timestamps the download folder).
  3. Enjoy.

Example Tag

{{ simplepie url="http://statamic.com/blog/feed|https://www.apple.com/main/rss/hotnews/hotnews.rss" limit="5" cache="yes" }}
  <h1><a href="{{ permalink }}">{{ title }}</a></h1>
  <h2>Posted on {{ date }}</h2>
  <div class="content">
    {{ content }}
  </div>
{{ /simplepie }}

Parameters

URL url

The URLs of the feed to be parsed.

url="http://statamic.com/blog/feed/|https://www.apple.com/main/rss/hotnews/hotnews.rss"

Combine multiple feeds by using "|" as seperator.

Order By Date order_by_date

default: yes

Order by date or default feed order.

Limit limit

Default: 10

Limit the number of items returned.

Offset offset

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

Cache cache

Default: no

Turn caching on for faster page loads or to limit API/Feed requests.

Timeout timeout

Default: 10 (seconds)

The maximum number of seconds to spend waiting to retrieve a feed.

Variables

Upon successfully retrieving a feed, the following default variables become available inside the the {{ simplepie }} tag pair.

  • {{ title }}
  • {{ permalink }}
  • {{ date }}
  • {{ update_date }}
  • {{ author }}
  • {{ category }}
  • {{ description }}
  • {{ content }}

About

A fast and easy-to-use RSS and Atom feed parsing plugin for Statamic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%