Jon Stevens wrote:
> 
> on 10/2/2000 11:52 PM, "Fedor Karpelevitch" <[EMAIL PROTECTED]>
> wrote:
> 
> > I remember people criticizing, for example, freemaker for the ability to
> > define functions, and I totally agree with it. KISS. Let's not make Velocity
> > another mammoth. Macroses just do not belong here.
> 
> Although, functions are a bit different than Macro's. With a function, you
> define a new language (or use an existing language...ie the way JSP works)
> to work within that function. With Macro's you are simply defining re-usable
> bits of VTM and HTML.
> 
> So, Fedor, do you have a suggestion for how to best solve the problem of
> easily defining re-usable bits of VTM and HTML? In Turbine, we solve that
> problem with Navigation templates. You can simply call:
> 
> $navigation.getTemplate("foo.vm") any where in your code and expect it to
> get processed with the current context. So, how do we move that solution up
> to Velocity where it belongs so that people who don't use Turbine can also
> use this functionality?

With same very formatters:

I just put:

$foo

in the template, "foo" should be an org.webmacro....Template object. In config file I 
define formatter for the org.webmacro....Template, and that formatter renders the 
template. Cleaner, isn't it?

fedor.

Reply via email to