velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: parsing variable name in a velocity template
Date Thu, 22 May 2003 08:50:14 GMT
Hey people, who's dreaming? Why hasn't someone else (the authors) spoken up?

There is a TemplateTool written for exactly this sort of use case. For more
information see the thread:

You can download it from:

(it would be nice to have the updates done for the TemplateTool to flow back
into the CVS).


Dave Newton wrote:
> On Tue, 2003-05-20 at 19:20, Barbara Baughman wrote:
>>Unless you want to be a mind reader, I'd ask the user to tell you their
>>template variable names that will feed into the template.  Otherwise, tell
>>the user they can't have the format $something or ${something} in their
>>template without referring to a template variable.  At this point, you
>>really aren't using Velocity at all.
>>[... snip ...]
>>The MVC model assumes that the programmer will know what pieces of
>>information the designer wants to pass from the knowledge base to the
>>template.  I think it's reasonable to ask your users what pieces of
>>information the user wants to send to their template.
> For the most part I agree with everything you've said, but I have a very
> specific need to know when there are variables in the template that I
> (the programmer) don't or didn't know about...
> We use Velocity to generate our (opt-in, lemme alone!) email newsletter.
> In order to facilitate idiot-proofing I have to know if the template
> designer (definitely NOT a programmer :) either mis-spelled something,
> left something out, or added something that I don't provide.
> This knowledge allows us to unit-test (sorta) our email templates (which
> we use for every email our site sends; registration confirmation,
> newsletters, etc.) and make sure that an email template hasn't been
> broken by me or the template designer.
> Dave
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

:) Christoph Reck

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

View raw message