velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
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(shinobu.kawai@gmail.com)

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message