is there an if exists function?

Hi,

We want to be able to check whether a field exists before the template trys to out put the content (this would then stop errors in the page).

Is there an IfExists function, or something similar, to check this?

Thanks

Georgina

Georgina,

Try something like

hasProperty(“rx:XXXXX”)

Nick.

You should note that hasProperty() will return true with the field is DEFINED, even if it has no values.

In Velocity, #if($foo) will return false when $foo is null or the empty String.

Great thanks. I used the hasProperty option because it didn’t matter if it returned true if it had no value.