We’ve making a module for a marketplace where users can sell their items with images. Now we want to check or a advertisment has a image, but the if statement won’t work. The value of the variable does work, we can see the value.
{img1}
will output the value. But this
{if img1 == ""}
empty
{if:else}
if not empty
{/if}
always output empty, even when img1 is nog empty.
What are we doing wrong?
Beat me to it 😉
More information on Conditionals and using them in your own plugins and modules is here though.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.