velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <d...@solaraccess.com>
Subject Re: parsing variable name in a velocity template
Date Wed, 21 May 2003 15:11:44 GMT
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: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message