Thursday 09 September 2004 9:11:47 am
Hi there, I'm trying to use the 'let,default' function documented at http://ez.no/ez_publish/documentation/development/libraries/ez_template/functions/function_list It has a working example of:
{let var1=42 var2='forty-two'}
{default var1=53}
Variables: {$var1} ({$var2})
{/default}
{/let}
I'm trying to use this with a ezurl get, so I have:
{let carat=ezhttp( 'search_carat', 'get' )}
{default carat=53}
Carat equals: {$carat}
{/default}
{/let}
If the value of carat exists in the url, everything is fine. But if its not there the default statement doesnt work - with no info in the url, i.e. there is nothing to get the value of $carat stays blank?... Has anyone got an idea why this is happening, or some working code that creates a default value for a variable if there is no 'GET' information in th url? Thanks, Steve.
http://www.oneworldmarket.co.uk
|