About 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.

Category 1Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Category 2SEO/Accessibility
Modules designed to help site accessibility, standards compliance and SEO.
Category 3Social, Feeds, Services
Modules that provide or work with social networking services and/or external feeds.
Category 4Core Modules
Core modules are those already included with the ProcessWire core, but not necessarily installed. Most modules listed here can be installed by going to the modules screen and clicking "install" next to the module name.
Release StateStable
Should be safe for use in production environments. *
Authorryan
Module Version1.0.0
Class NameMarkupRSS
Compatibility2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0
Date AddedJuly 31, 2012
Recommended ByNew recommendations may take up to 1 day to appear.

Details

Usage example


Code:
// 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
Code:
// 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;';

Instructions

This module is included with the ProcessWire core and thus can be installed just by going to Admin > Modules > Markup > RSS > install.

Comments

No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.