As and when I get time, I’m going to post some more information about this site’s conversion over to Textpattern. I’m going to evangelise it until I’m blue in the face.
There were quite a few little tweaks I had to make, but here are just a few notes to be getting on with…
Clean URLs for the news feeds
Create your folder structure (such as /feeds/rss/) and place the following code in an index.php file in that last directory:
Just replace ‘rss’ for ‘atom’ if you need that feed too. I’ve also specified that the feed should come from my journal section, but you if you just run Textpattern as a blog you leave this out. Thanks to Drew McLellan of Allinthehead for this one.
In order to get Texpattern and Shaun Inman’s Shortstats working in harmony, I placed the shortstat include at the bottom of each of the section text files in the root. For example, in the ‘article’ file you would have :
$s = "article";
Mixing hard coded and txp driven pages
In the about section, I needed to do something clever for the ‘about hicksdesign’ page, wheareas the colophon and the contact pages would essentially be just articles.
....hard coded content in here....
<txp:article limit="1" form="about" />
This method is also used to alter the layout between the desktops page and the other downloads pages.
- Posted: 22 Jun 2004
- Comment: via Twitter