Create and customize your own RSS feeds


HowTo: Create and customize your own RSS feeds

Benefits:

  • Customize your RSS feeds as your want.
  • Gzip compress for output. Strip white spaces.
  • Allows you to group and manage RSS feeds as ordinary articles.

1. Install plugin aks_header

Get and install plugin aks_header

2. Create new page template “rssfile”

<txp:aks_header name="Content-Type" value="application/rss+xml" strip="1" gzip="1" nodebug="1" /><?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
 <channel>
  <title><txp:title no_widow="0" /></title>
  <description><txp:title no_widow="0" /></description>
  <link><txp:link_to_home /></link>
  <atom:link href="<txp:permlink />" rel="self" type="application/rss+xml" />
  <pubDate><txp:php>echo safe_strftime('rfc822');</txp:php></pubDate>
  <txp:article><txp:body /></txp:article>
 </channel>
</rss>

3. Create new Section “mrss”

Create customize feed

4. Exclude section “mrss” from your sitemap (optional)

5. Create new form “rss_custom”

<item>
<title><txp:title no_widow="0" /></title>
<link><txp:permlink /></link>
<guid><txp:permlink /></guid>
<pubDate><txp:modified format="%a, %d %b %Y %H:%M:%S GMT" lang="en-gb" gmt="1"/></pubDate>
<description><![CDATA[<txp:excerpt />]]></description>
</item>

6. Create new article (e.g. RSS feed)


  • Article Markup – MUST be Leave text untouched
  • URL-only title
  • Section – MUST be mrss
<txp:article_custom form="rss_custom" limit="10" section="howto" sort="LastMod desc" />

Create RSS feed

7. It’s ALL.

See result: http://makss.uaho.net/mrss/howto.xml





Textpattern Tips and Tricks: