Forums / Setup & design / just can't get 'let' and 'set' to work properly
Ben Pirt
Friday 01 August 2003 7:07:30 am
I have the following code:
{section name=loop1 loop=3} {let var1=2000} {section name=loop2 loop=3} {$loop1:var1} {set $loop1:var1=1000} {/section {/let}{/section}
which should output 2000 1000 1000 2000 1000 10002000 1000 1000
but actually outputs 2000 2000 2000 2000 2000 20002000 2000 2000
so it seems that the 'set' function is not working properly. How do I set this variable correctly? Anyone's helpl would be massively appreciated, this is driving me slowly mad :-)
All the best,Ben
Paul Forsyth
Friday 01 August 2003 7:42:45 am
Have a read of this thread. I had the same problems.
http://ez.no/developer/ez_publish_3/forum/developer/using_letset_within_namespaces
paul
Friday 01 August 2003 8:34:21 am
Thanks for the reply - managed to get it working by stripping out a lot of the namespaces. Seems like the improvements to template namespaces need to happen quite urgently as the current set up just doesn't seem particularly practical or logical. I've been a programmer for years now, but this had me totally stumped :-)
oh well, on with the rest of the work now.
Cheers,Ben