[FreeMarker-user] Is it possible to assign multiple macro calls into an array
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
From: Albert K. <moo...@gm...> - 2015-02-13 09:44:32
|
Hello ! I know this is absurd example, but instead of doing these repetitive row macro calls on each comment : <@commentbox> <@row> <@comment id=1 /> </@row> <@row> <@comment id=2 /> </@row> <@row> <@comment id=1 /> </@row> </@commentbox> It'll be simpler if i could do something like this : <@commentbox> <#assign comments=[ <@comment id=1 />, <@comment id=2 />, <@comment id=1 /> ]> <@wrapInRow comments /> </@commentbox> I know we can nest macro result within the assign tag, but it doesnt solve the repetitiveness of the assign tag calls. Is this supported or planned ? Or perhaps there's a pattern for this situation ? Thank you ! -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh) |