Textpattern Plugin : ajw_clean_feed
15 November 2005 @ evening time | Comments (8)
Plugin Details
- Download:
- ajw_clean_feed
- Version:
- 0.2
- Forum:
- Read discussion
- Status on this site:
- Active
Please use forum for all bug reports and questions
Summary
This plugin extends Textpattern’s default Atom & RSS functionality to allow for /clean/feed/urls. Included with this plugin is the template tag ajw_clean_feed_link (detailed below), which is used for displaying feed links in your page templates.
Setup
All that needs to be done to enable clean feed urls on your site is install & activate this plugin. RSS and Atom should then be accessible at any /clean/rss/ or /clean/atom/ url.
Example URLs
- Articles
http://example.com/rss/(default)http://example.com/foo/rss/(articles in section ‘foo’)http://example.com/category/bar/rss/(articles under category ‘bar’)
- Links
http://example.com/link/rss/(links feed)http://example.com/link/foo/rss/(links feed for links category ‘foo’)
- Comments 1
http://example.com/comments/rss/(sitewide comments)http://example.com/yyyy/mm/dd/url-title/rss/(article comments)http://example.com/section/id/url-title/rss/(article comments)
1 Requires ajw_comments_feed. URL will depend on your permlink mode.
Template tag: ajw_clean_feed_link
Now that you have clean feeds working, you will need to use the template tag ajw_clean_feed_link in order to output links to sitewide, per-section, per-category, comments, or links feeds. This template tag works identically to feed_link and link_feed_link, with a few additional attribute options:
Standard attributes:
- flavor
- label
- title
- wraptag
- category
- section
Non-standard attributes:
sitewide- (y|n) Setting this to ‘y’ will always output a “sitewide” feed link in the format
http://example.com/rss/orhttp://example.com/atom/, regardless of the context of the template tag.
- (y|n) Setting this to ‘y’ will always output a “sitewide” feed link in the format
area- Using
area="link"will output a clean feed link to your site’s links log - Using
area="comments"will output a link to a comments feed, either sitewide (see above attribute) or per-article.
- Using
url_only- (y|n) Setting this to ‘y’ will output only the feed url, for use in autodiscovery
<link>tags in the head of your webpage.
- (y|n) Setting this to ‘y’ will output only the feed url, for use in autodiscovery
Revision History
- v0.2
- Fixed sitewide comments feed & feed link
- Added default feed link text
8 comments