velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ford, Peter" <Peter.F...@travelocity.com>
Subject Nesting Velocity tags
Date Thu, 13 May 2004 16:37:36 GMT

Question: Can Velocity recursively process tags found inside values returned from the context?

Here's a simplified example of what I'm talking about. My template may contain something like:

===
My name is ${name}.
===

In the context I have these key/value pairs:

first=Fred
last=Bloggs
name=${first} ${last}

When I process the template against that context, I would like to see:

===
My name is Fred Bloggs.
===

...but my initial tests give me:

===
My name is ${first} ${last}.
===

Possibly I'm doing something wrong, possibly there's a very simple way to make it do what
I need and I'm just not seeing it. Unfortunately this isn't a hypothetical situation - this
is something I have to get working, and I'm running out of time. If anyone knows the answer
I'd appreciate it.

Thanks,
Pete

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