Textpattern quick tip: Permlink
Have you sometimes wished for more control over the permalinks in textpattern? Well, it turns out you can; the tag can be used in two ways, either as a container or a single tag.
<txp:permlink><txp:title /></txp:permlink>
outputs:
<a href="http://yoursite.com/permanent_link">article title</a>
which could be quite inflexible if you’d like to add a class or a custom title attribute. Single mode to the rescue:
<a href="<txp:permlink />" title="whatever" ...
As a single tag, will only output the permanent url, and you’re free to use it in whatever context you’d like.
This is nothing revolutionary or anything, and it’s well documented, but I only found out about it a couple of months ago — the single tag wasn’t implemented in earlier versions of Textpattern, and there was nothing in the default theme leading me to think that it could be used in that way.
The Alphabetical Tag Listing on the Textpattern wiki is a great resource.
1 comment so far. Go ahead, write something
You can follow any responses to this entry through the RSS feed
I didn’t know that. Thanks for the tip!
#1 Christian Sandberg 26 Apr 06
Type here: