Forums / General / Assign {section} to a variable

Assign {section} to a variable

Author Message

Thomas Brandl

Thursday 11 September 2003 6:23:38 am

There's no obivous {section assign="myar"}, but is there some workaround for assigning an entire section contents to a variable instead of pitting is out?

Thanks!
t

Gunnstein Lye

Thursday 11 September 2003 9:14:05 am

Use set-block.

{set-block scope=root variable=myvar}
Hi there! I am a test!
{/set-block}

Now you have the string in {$myvar}.

Thomas Brandl

Thursday 11 September 2003 9:31:40 am

Perfect, thanks!