RSS Feed Generator

Given a PageArray of pages, this module will render an RSS feed from them. This is intended to be used directly from a template file.

Usage example
------------
// retrieve the RSS module

$rss = $modules->get("MarkupRSS");



// configure the feed. see the actual module file for more optional config options.

$rss->title = "Latest updates";

$rss->description = "The most recent pages updated on my site";



// find the pages you want to appear in the feed.

// this can be any group of pages returned by $pages->find() or $page->children(), etc.

$items = $pages->find("limit=10, sort=-modified");



// send the output of the RSS feed, and you are done

$rss->render($items);


More configuration options
---------------
// Title for the RSS feed

$rss->title = 'RSS feed title';



// Optional URL to the RSS feed

$rss->url = 'http://domain.com/rss/feed/url';



// Optional description of the RSS feed

$rss->description = 'RSS feed description';



// Optional XSL stylesheet link

$rss->xsl = 'http://domain.com/rss/xsl/stylesheet.xsl';



// Optional CSS stylesheet link

$rss->css => 'http://domain.com/rss/css/stylesheet.css';



// Optional copyright line in the feed

$rss->copyright = 'RSS feed copyright line';



// TTL time to life/refresh, 60 minutes default

$rss->ttl = 60;



// ProcessWire field to use for item title (default=title)

$rss->itemTitleField = 'title';



// ProcessWire field to use for item description (default=summary)

$rss->itemDescriptionField = 'summary';



// Maximum length for description (module will truncate to this length)

$rss->itemDescriptionLength = 1024;



// ProcessWire field to use for item date (default=created)

$rss->itemDateField = 'created';



// Header to send before feed output (default is shown below)

$rss->header = 'Content-Type: application/xml; charset=utf-8;';

More modules by Ryan Cramer

  • Hanna Code

    Easily insert any complex HTML, Javascript or PHP output in your ProcessWire content by creating your own Hanna code tags.
  • Form Builder PRO

    Building front-end forms on your website has never been so simple. ProcessWire Form Builder lets you create, edit and publish forms with no development necessary.
  • ProCache PRO

    ProCache provides the ultimate performance for your website by completely bypassing PHP and MySQL and enabling your web server to deliver pages of your ProcessWire site as if they were static HTML…
  • ProcessWire Upgrade

    Tool that helps you identify and install core and module upgrades.
  • Site Profile Exporter

    Enables exporting of ProcessWire site profiles for sharing or distribution with others.
  • Map Marker (Google Maps)

    This Fieldtype for ProcessWire 2.1+ holds an address or location name, and automatically geocodes the address to latitude/longitude using Google Maps API.
  • Video embed for YouTube/Vimeo

    Enables translation of YouTube or Vimeo URLs to full embed codes, resulting in a viewable video in textarea fields you apply it to. Now with support for responsive videos too.
  • Import Pages from CSV files

    Enables you to import CSV files to create pages.
  • Database Backups

    Create and/or restore database backups from the ProcessWire admin.

All modules by Ryan Cramer

Install and use modules at your own risk. Always have a site and database backup before installing new modules.