Content last modified Monday 6 March 2017
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


It’s a simple function that checks to see if an entry field (title, body, excerpt, category1, category2 or image) contains data. If the if_not empty tag is used and the field contains data, the code between the open and close tags is executed, and if the field is empty the code is ignored. There is also an if_empty tag, which obviously does the opposite.

In version 3.0 there is also a minlength parameter so that you can specify how many words you require for the field not to be considered emtpy.

Currently the plugin works with the title, body, excerpt, category1, category2, and article_image fields.

If Empty does not work with keywords or custom fields.

For a plugin that works with custom fields, see mdn_if_custom.

Sample Code:
<txp:swf_if_empty field="title" minwords="2"> <p>Untitled</p> </txp:swf_if_empty>
<txp:swf_if_not_empty field="title" minwords="2"> <txp:title /> </txp:swf_if_not_empty>

Article Request Count:

Archived [?]: orphaned: broken links

Initially released:
Posted here:
16 Feb 2005
Article modified:
26 Mar 2008

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Commenting is closed for this article.

Commented (2)

This is a really useful plugin for me.

Download file is broken. Too bad because I can’t find this plug-in anywhere else.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern