Hello all. I have the following code in my template:
{if description}{description}
{if:else}{event_summary}
{/if}The template incorrectly evaluates the first “if” to false even when there is a description present. Not only that, if I leave out the conditional and just write
{description}
{event_summary}Expressionengine will correctly print out the contents of both fields.
So… the fields really are filled, and they really have the correct names, and the conditional really ought to evaluate as “true”. Also, I’ve tried many permutations of the conditional (negations, wrapping it in quotes and brackets and comparing to an empty string, etc) and had no real luck. The only version that sort of worked was this one:
{description}
{if "{description}"==''}{event_summary}
{/if}But today I discovered that this code causes some of the entries to display a blank white page, so it looks like it’s not a very good solution after all.
The “description” field is an LG TinyMCE, and event_summary is a Textarea. I’m using EE 1.6.8.
Any ideas?