Hidden Features in Textpattern pt.2

Textpattern uses special tags, which when placed inside template code, call on a variety of functions to output data. From a list of articles to a single permalink, each tag maps to a function that uses the tags attributes to determine the end output. It seems some tags have hidden/undocumented attributes. Prior to RC3, it was possible to override the date format set in the admin section, for example.

While adding del.icio.us style tagging support to the latest checkout from SVN, I noticed some other hidden txp:tag attributes, one of which made my job a whole lot easier.

<txp:article /> can take more than the limit, list_form and form attributes given in the tag builder. It can also take keywords and time attributes. Time can be given values of ‘any’ or ‘future’ to override the default behaviour of only publishing posts where the publish date/time is in the past. Keywords can be fed a comma delimited list of keywords. Only articles that match those keywords will be shown – perfect for listing articles with a certain keyword/tag! Finding this saved me a lot of time, and means my tag support is pretty much ready for testing, with only a few more minor details to work out first.

So that’s now a couple of hidden features that I’ve found… Has anybody else found any gems like this hidden away in TXP? I’m sure there’s got to be more!

%d bloggers like this: