swf_if_empty
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>
or
<txp:swf_if_not_empty field="title" minwords="2">
<txp:title />
</txp:swf_if_not_empty>
Archived [?]: orphaned: broken links









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:
Commented (2)
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.