wet_article_thumb is a plugin for Textpattern, rendering a thumbnail associated with an article’s image and optionally linking this thumbnail to the related article’s page. It combines the results of Textpattern’s built-in tags <txp:permlink />
, <txp:title />
, and <txp:article_image />
into a single convenient template tag.
Usage
<txp:wet_article_thumb />
- Display the thumbnail for the current article’s image
<txp:wet_article_thumb class="thumb" link="1" />
- Display the thumbnail for the current article’s image.
- Apply class
thumb
to the image tag. - Make the thumbnail a link to the article. This comes handy in article lists.
Marios prepared an extensive tutorial on building a gallery site with Textpattern sporting wet_article_thumb
.
Alexandra dissects Christian Sandberg’s photo blog setup in one of her german Textpattern tutorial articles, also featuring this humble Textpattern plugin.
Last, but not least, wet_article_thumb is used on this site for all article lists.
Required attributes
None.
Optional attributes
attribute | description |
---|---|
class | CSS class which will be applied to the <img> tag. Defaults to "wet_article_thumb" . |
style | style attribute which will be applied to the <img> tag. Defaults to “”. |
align | align attribute which will be applied to the <img> tag. Default is empty. |
link | Link the thumbnail image to the article. Defaults to "1" . Set to "0" to disable the thumbnail’s link to the article. |
rel | rel attribute appplied to the article link. Defaults to “bookmark”, as microformats are hip these days. |
link_class | CSS class which will be applied to the article permlink. Default is empty. |
Licence
This plug-in is released under the Gnu General Public Licence.
Download
Get it here: wet_article_thumb.txt.
Resources and Relateds
Express your suggestions, report bugs and discuss enhancements in this Textpattern forum thread.
Change log
Date | Version | Notes |
---|---|---|
2005-10-21 | 0.1 | Initial release |
2005-11-03 | 0.2 | Escape alt and title attributes |
2006-08-04 | 0.3 | Supports a comma separated list of article images, uses first image’s thumb |
2007-01-03 | 0.4 | Added rel and link_class attributes |
nardo
26. Januar 2006, 13:09
Robert
26. Januar 2006, 13:13
Christian Sandberg
11. Mai 2006, 20:49
aldo
16. Juni 2006, 20:44
Robert
16. Juni 2006, 21:11