Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
A better way to publish the feeds
Hi,
I like TextPattern because of the freedom I have to make my sites look as I really want to. It accomplishes a quite good separation of content from presentation, however it’s assumed that we always want to publish HTML.
The idea is to make a small change in the section handling, just a new attribute which allows to set the HTTP Content-type. This way, we could for example, publish our ATOM or RSS feeds in a customized version by the use of custom ‘pages’ and ‘forms’.
An example ‘page’ for Atom:
<pre><code>
<?xml version=“1.0” encoding=“utf-8”?>
<feed xmlns=“http://www.w3.org/2005/atom”>
and the example ‘form’:
<pre><code>
<entry>
<title><txp:title /></title>
<link href=”<txp:permlink />” />
<id><txp:permlink /></id>
<updated>2006-07-12T10:00:00Z</updated>
<summary><txp:body /></summary>
</entry>
</code></pre>
With this aproach it’s much simpler to customize the feeds, since we can modify them from the admin interface, taking advantatge of the available plugins.
Besides the feeds, we can also implement simple web services using this aproach. Moreover, all the data is always plublished thru a unique pipeline, so cache solutions for the html content will also work for the other formats.
ciao,
ivan
Offline
Re: A better way to publish the feeds
I like this idea, it’s very similar to how other projects deal with feeds.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline