A
Arvind
We are researching on usage of velocity at our place....we havesetup
velocity with templates being loaded from databases, setup for using
the macros etc.
If the 'rendered' content has VTL code in it, I am curious, as to
how/whether we can support 'another pass' of velocity, ..as in,
user-generated content using system defined velocity macros.
hypothetical example....
##define a macro to 'bold' the output text in bold.vm
#macro (bolder $text)
<b>$text</b>
#end
actual template.....
Template (foo.vm)
#parse ('bold.vm')
<html>
#bolder ('welcome john doe')
#foreach
<!--print some list of items and items themselves contain #bolder
(sometext) -->
#end
</html>
When the velocity engine is done with its work, #bolder (sometext) does
not get evaluated and it gets printed out as-is
This requirement is like the usage of macros in confluence (atlassian)
etc - just curious whether there are users who have used velocity for
this purpose. If there are - any best practises/things to watch out for
?
Are there other ways of handling such requirements ?
Thanks for your time.
velocity with templates being loaded from databases, setup for using
the macros etc.
If the 'rendered' content has VTL code in it, I am curious, as to
how/whether we can support 'another pass' of velocity, ..as in,
user-generated content using system defined velocity macros.
hypothetical example....
##define a macro to 'bold' the output text in bold.vm
#macro (bolder $text)
<b>$text</b>
#end
actual template.....
Template (foo.vm)
#parse ('bold.vm')
<html>
#bolder ('welcome john doe')
#foreach
<!--print some list of items and items themselves contain #bolder
(sometext) -->
#end
</html>
When the velocity engine is done with its work, #bolder (sometext) does
not get evaluated and it gets printed out as-is
This requirement is like the usage of macros in confluence (atlassian)
etc - just curious whether there are users who have used velocity for
this purpose. If there are - any best practises/things to watch out for
?
Are there other ways of handling such requirements ?
Thanks for your time.