Forums / Developer / Improved template syntax - spec-14 (Completed)

Improved template syntax - spec-14 (Completed)

Author Message

Andrew Vorobyov

Thursday 02 June 2005 3:13:41 am

Improved template syntax - spec-14 (Completed)
http://ez.no/community/developer/specs/improved_template_syntax

Is it already implemented in 3.6.0?

Cause this is not working for me..

{set $i=10}
i: {$i}

Hans Melis

Thursday 02 June 2005 3:31:15 am

Hi,

That spec has been implemented in 3.6.0, but your usage of the set function is wrong. <b>set</b> can only be used to re-initialise existing variables, not to define new ones.

With regards to the new syntax, the correct way would be:

{def $i=5}
i: {$i}
{set $i=10}
i: {$i}

An {undef} at the end would clean up $i, but this will also happen automatically at the end of the execution of that template.

Hans
http://blog.hansmelis.be