Is it possible to assign multiple macro calls into an array
Albert Kam <[email protected]> Fri, 13 Feb 2015 16:44:25 +0700
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <CAMT20g8A7Cc0aJbtgS4GUBh_a-AxrsX4d9WhoFE-GM-vLxMJLQ@mail.gmail.com> |
--===============3962708916471310618==
Content-Type: multipart/alternative; boundary=001a1133c96205ff4a050ef51518
--001a1133c96205ff4a050ef51518
Content-Type: text/plain; charset=UTF-8
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)
--001a1133c96205ff4a050ef51518
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hello !<div><br></div><div>I know this is absurd example, =
but instead of doing these repetitive row macro calls on each comment :</di=
v><div><@commentbox></div><div>=C2=A0 =C2=A0 <@row></div><div>=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 <@comment id=3D1 /></div><div>=C2=A0 =C2=
=A0 </@row></div><div>=C2=A0 =C2=A0 <@row></div><div>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 <@comment id=3D2 /></div><div>=C2=A0 =C2=A0 </@r=
ow></div><div><div>=C2=A0 =C2=A0 <@row></div><div>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 <@comment id=3D1 /></div><div>=C2=A0 =C2=A0 </@row&g=
t;</div></div><div></@commentbox><br clear=3D"all"><div><br></div><di=
v>It'll be simpler if i could do something like this :</div><div><div>&=
lt;@commentbox></div><div>=C2=A0 <#assign comments=3D[</div><div>=C2=
=A0 =C2=A0 =C2=A0 =C2=A0 <@comment id=3D1 />,=C2=A0</div><div>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 <@comment id=3D2 />,=C2=A0<br></div><div>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 <@comment id=3D1 /><br></div><div>=C2=A0 ]></=
div><div>=C2=A0 <@wrapInRow comments /></div><div><div></@commentb=
ox><br></div></div></div><div><br></div><div>I know we can nest macro re=
sult within the assign tag, but it doesnt solve the repetitiveness of the a=
ssign tag calls.</div><div><br></div><div>Is this supported or planned ? Or=
perhaps there's a pattern for this situation ?</div><div><br></div><di=
v>Thank you !</div><div><br></div>-- <br><div class=3D"gmail_signature">Do =
not pursue the past. Do not lose yourself in the future. <br>The past no lo=
nger is. The future has not yet come. <br>Looking deeply at life as it is i=
n the very here and now, <br>the practitioner dwells in stability and freed=
om.<br>(Thich Nhat Hanh)</div>
</div></div>
--001a1133c96205ff4a050ef51518--
--===============3962708916471310618==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
--===============3962708916471310618==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
--===============3962708916471310618==--