SOLVED

Custom functions in velocity

Go to solution
Franky_Ruyssch2
Level 4

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

Franky Ruysschaert
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Custom functions in velocity

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.

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Custom functions in velocity

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.