I have a desire to hook when unknown directives are called from a template.  

The use case is to enable Velocity as a templating engine for JRuby on Rails 
(and other JRuby'ish things, possibly Sinatra, etc).  I've created some code to 
get part of the way there: <http://github.com/erikhatcher/velaro>

What I'd like to be able to cleanly facilitate is templates that call any of 
Rails view helper methods, like this: #url_for(....) where there is no actual 
implementation of a UrlFor Directive or #macro definition.  I'd like to be able 
to dynamically delegate to any view helpers that Rails is providing, and if not 
then fall back to standard Velocity handling.

I've looked around the 1.6.4 source code a bit and see RuntimeMacro and 
VelocimacroProxy as some potential leads in how to go about this.  But I'm not 
quite seeing if/how to hook into this capability.

Is this possible?  If so, any pointers to get me going?

Thanks!
        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to