velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Glass-Husain <wgl...@forio.com>
Subject Re: Overriding the default precedence of the template engine
Date Thu, 20 Jul 2006 12:55:42 GMT
Hi Mike,

Not sure.  The basic premise behind Velocity is this notion of the 
application providing the context and then the template being filled 
out.  Such an approach keeps things simple.

You might look at the Velocity Tools project -- there's a item called 
RenderTool that lets a Velocity template evaluate more text within itself.

WILL

Smith, Mike H wrote:
> Hi,
>
>  
>
> Is there a way to modify the precedence logic of the template engine?
>
>  
>
> In particular, I'd like to:
>
>  
>
>  
>
> 1.	Define a template like:
>
>  
>
> #set( $this = "Velocity")
>
> $this is great!
>
>  
>
> 2.	Within the application code, set the "this" property to be
> something different (e.g. "Laughter")
> 3.	Then have the engine render as "Laughter is great"
>
>  
>
>  
>
> With the current implementation the rendering precedence is template
> then context, any easy way to reverse this?
>
>  
>
> Thanks.
>
> Mike
>
>  
>
>  
>
>  
>
>
>   

-- 
Forio Business Simulations

Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.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