MarkupRSS by Ryan Cramer

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.

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;';

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

Latest news

  • ProcessWire Weekly #532
    In the 532nd issue of ProcessWire Weekly we'll cover the latest core updates, check out a couple of brand-new third party modules, and more. Read on!
    Weekly.pw / 20 July 2024
  • Page List Custom Children module
    This simple module gives you the ability to customize the parent/child relationship as it appears in the admin page list, enabling child pages to appear under more than one parent.
    Blog / 28 June 2024
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.