|
Re: parsing variable name in a velocity template: msg#00122jakarta.velocity.user
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 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Velocity as Code Generator...: 00122, Nathan Bubna |
|---|---|
| Next by Date: | Re: Velocity as Code Generator...: 00122, Dave Newton |
| Previous by Thread: | Re: parsing variable name in a velocity templatei: 00122, Barbara Baughman |
| Next by Thread: | Re: parsing variable name in a velocity template: 00122, Christoph . Reck |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |