how to check the variable type in template

Kintaro

Well-known member
Licensed customer
In a template, I need to check if a variable is a string or a number.
Is it possible?

Thank you
 
This should do it:

{xen:dump $var}
uhmm this will list all the information about $var, right? (I'm going to try)
I need to use that info in a conditional: if $var is a string do this if is a number do that.
 
Oh, in that case I think you can do this (un-tested, I think we expose it like this):
Code:
<xen:if is="is_string({$var})">

<xen:else />

</xen:if>
 
Back
Top Bottom