Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] tfu_image_or

#1 2005-01-20 14:37:44

carton
Archived Plugin Author
From: Tokyo
Registered: 2004-08-10
Posts: 9
Website

[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.

Download

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

  1. Index
  2. » Archives
  3. » [archived] tfu_image_or

Board footer

Powered by FluxBB