velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <tcol...@cisco.com>
Subject RE: #parse content from a variable?
Date Sun, 19 Sep 2004 04:10:24 GMT
> Are you saying that you want something that has the function of the
> #parse directive and the (View)RenderTool combined?  
Yes, I think so. 

> I mean, how is it going to tell whether it's a
> template file or plain VTL?
Howabout if it had a different extension, or a custom loader?

#parse ("thingy.var")
#parse ("thingy.vm")

Parse just asks the loader(s) to go find "thingy.vm", right? 
Normally, this might be found using a file rsrc or webapp rsrc loader,
perhaps a third loader in the chain might go looking inside the
Request/Session/App bags?

Or maybe there is a way to have *.var trigger the custom resource loader?

 
> Why not just put the contents of "A.THINGY" in a template file and
> always use #parse?
Because the template of A.THINGY will be variable, possibly from a database,
or possibly from a form input (think real-time render).

Timo


---------------------------------------------------------------------
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