Forums / Setup & design / Setting a variable with let

Setting a variable with let

Author Message

Paul Carpenter

Saturday 03 April 2004 9:02:21 am

I'm sure the answer to this is simple but I can't seem to get it. I'm trying to set a variable that holds the date 14 days from current date and then pass it as a default value to attribute_edit_gui. In my template I've got:

{let date=sum(currentdate(),1209600)}
{$date}
{attribute_edit_gui attribute_base=$attribute_base attribute=$ContentObjectAttribute:item value=$date}
{/let}

debug returns: Unknown template variable 'date' in namespace ''

What am I doing wrong?