Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Topic closed
[archived] tfu_image_or
Notice: This thread is archived, this can be achieved with a combination of native txp tags now.
**********************************************************
tfu_image_or returns the contents of an article’s <em>Article image</em> field. If that field is empty, or if the current page displays a list of articles, a default value is returned. For example:
<xp:tfu_image_or />
returns an empty string if Article image is empty.
<txp:tfu_image_or default="section.jpg" />
returns “section.jpg” if no article image is found.
Disclaimer: I wrote this mainly to familiarise myself with Txp plug-in development. If you need a little more versatility I recommend the if_empty plugin
Last edited by carton (2005-01-20 14:40:13)
Offline
Pages: 1
Topic closed