Skip to main content
Franky_Ruyssch2
Level 4
Feb 14, 2022 10:11 AM UTC
Solved

Custom functions in velocity

Hi, does anyone know if there is an option to define custom functions in velocity script.

Hard to fine more info on the internet.

 

Regards

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Feb 14, 2022 6:46 PM UTC

Yes, they’re called Velocimacros: the #macro directive. You can read a lot about them in my blog posts.

 

Be aware that Velocimacros are intended to return Strings (they’re for output, in other words). But they can work with any other datatype internally.

1 reply

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Feb 14, 2022 6:46 PM UTC

Yes, they’re called Velocimacros: the #macro directive. You can read a lot about them in my blog posts.

 

Be aware that Velocimacros are intended to return Strings (they’re for output, in other words). But they can work with any other datatype internally.

Translate