velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <>
Subject Re: #parse content from a variable?
Date Sun, 19 Sep 2004 01:00:13 GMT
Hi Tim,

> > request.setAttribute("A.THINGY", "#set ($foo=1) $foo $bar $bleck");
> > request.setAttribute("thing_to_inclue", "A.THINGY");
> > In the template:
> > #parse ("$thingy_to_parse")
> Say, and before Nathan jumps in to say, "use the tool --
> $evaluate($thingy)"... let me muddy the waters a bit, in that I'd like to
> keep the template using #parse, because sometimes I'll still have
> $thingy_to_parse="/templates/Foo.vm" i.e. a normal file refernce.
Are you saying that you want something that has the function of the
#parse directive and the (View)RenderTool combined?  I think that's too
much responsibility.  I mean, how is it going to tell whether it's a
template file or plain VTL?

Why not just put the contents of "A.THINGY" in a template file and
always use #parse?

Best regards,
-- Shinobu Kawai

Shinobu Kawai(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message