velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wglasshus...@gmail.com>
Subject Re: Blocks in Velocimacros
Date Thu, 03 Jan 2008 16:40:19 GMT
Hi Raghuram,

Unfortunately, no.  (There's a feature request in JIRA somewhere about this).

You can however code this in Java with a custom directive.  See the
notes in "Hacking Velocity" (downloadable from the Wiki) on how to do
this.  There's an example directive which takes a block of text,
parses it and generates end notes.
http://wiki.apache.org/velocity/HackingVelocity

Best, WILL

On Jan 2, 2008 7:13 PM, Raghuram Rajah <rraghuram@hotmail.com> wrote:
> Can I use a block within a velocimacro? Basically, I am trying to create a macro that
will emit a XHTML tag with some javascript out. I would hate to create a begin macro and an
end macro to accomplish this. That would be rather error prone.
>
> I would ideally like to do something like,
>
> #myForm(...)
>   <!-- some arbitrary html here -->
> #end
>
> generating something like
>
> <form ....
>   <!-- some arbitrary html here -->
> </form>
>
> Any suggestions would be greatly appreciated.
>
> Thanks,
> Raghu.
>
> _________________________________________________________________
> Share life as it happens with the new Windows Live.
> http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_122007



-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message