1771
HTML & templates / Re: Macros
« on: January 04, 2008, 02:01:45 PM »
It is the same difference when you define
{{set|myvar|{{cut|1|8|It is the same difference}} /set}}
and
{{set|mymacro| {{\ {{cut|1|$1|$2}} /}} /set}}
if you use
{{append|file|{{another macro}} }}
{{another macro}} is immediatly evaluated and result is stored in file
but with
{{append|file| {{\ {{another macro}} /}} }}
it is {{another macro}} who is stored in file
and when you include this file in your template {{load|file}}, it is here that the macro {{another macro}} is evaluated.
{{set|myvar|{{cut|1|8|It is the same difference}} /set}}
and
{{set|mymacro| {{\ {{cut|1|$1|$2}} /}} /set}}
if you use
{{append|file|{{another macro}} }}
{{another macro}} is immediatly evaluated and result is stored in file
but with
{{append|file| {{\ {{another macro}} /}} }}
it is {{another macro}} who is stored in file
and when you include this file in your template {{load|file}}, it is here that the macro {{another macro}} is evaluated.