Custom functions in velocity | Community
Skip to main content
Franky_Ruyssch2
New Participant
February 14, 2022
Solved

Custom functions in velocity

  • February 14, 2022
  • 1 reply
  • 1785 views

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.
Best answer by SanfordWhiteman

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
SanfordWhitemanAccepted solution
New Participant
February 14, 2022

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.