soo_image user guide Page 14 of 16

Conditional tags

Standard conditional tag behavior, compatible with else. Can be used anywhere. They require image context or else they will always evaluate to false (or empty in the case of soo_if_image_count, which treats context somewhat differently).

soo_if_txp_image

<txp:soo_if_txp_image>...<txp:else />...</txp:soo_if_txp_image>

Attributes

soo_if_txp_image does not accept any attributes; it simply checks whether or not the image is stored in the Txp image table (as opposed to an article image declared by URL).

soo_if_image_* (-author, -category, -thumbnail)

<txp:soo_if_image_author>...<txp:else />...</txp:soo_if_image_author>
<txp:soo_if_image_category>...<txp:else />...</txp:soo_if_image_category>
<txp:soo_if_image_thumbnail>...<txp:else />...</txp:soo_if_image_thumbnail>

Attributes

soo_if_image_thumbnail does not accept any attributes; it simply checks whether or not the image has a thumbnail.

soo_if_image_author and soo_if_image_category each accept the following attribute:

soo_if_image_count

<txp:soo_if_image_count>...<txp:else />...</txp:soo_if_image_count>

Counts the images available and allows conditional checks against that number. It checks the following contexts, in order of priority:

Outside any of these contexts, the tag does not return any output.

Attributes

All attributes default to empty; you must set one or the tag returns no output.