Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Molding Textpattern XML Feeds

As I was building this site and turned my attention to the RSS and Atom feeds that Textpattern generates, I found them to be pretty flexible. Out of the box, you can generate and send:

  • feeds of all available articles
  • feeds of all available links
  • feeds of articles or links filtered by section
  • feeds of articles or links filtered by category
  • feeds of articles or links filtered by section and category

For article feeds, you have the option to display either full articles or excerpts. In my site’s journal section, I use the excerpt for the article summary on the landing page and the full text for the article itself. Being such, I thought it would be good to offer feeds for both the excerpts and the full articles. Twenty minutes and a small bit of hackery later, I had it down. Here’s how I did it.

Have it both ways
Note: The following mods were performed on Textpattern 1.0rc1

There are 2 files that you’ll have to edit in order to get your choice full or summarized feeds. They are:
/textpattern/publish/rss.php
/textpattern/publish/atom.php

These are the files that generate your XML feeds and as they are quite similar in function and structure, once you make the changes in one file, it’s a piece of cake to apply them to the other.

read the rest at the Information URL below

Article Request Count:
Initially released:
21 January 05
Posted here:
30 Mar 2005
Article modified:
29 Dec 2013

If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:

Commenting is closed for this article.

Commented (1)

The Information URL is now 404. It looks like he updated his site & forgot to update here. The correct URL is http://kimili.com/journal/molding-textpattern-xml-feeds

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern