The #evaluate
directive can be used to dynamically evaluate VTL. This
allows the template to evaluate a string that is created at render time. Such a string
might be used to internationalize the template or to include parts of a template from a
database.
The example below will display abc
.
#set($source1 = "abc")
#set($select = "1")
#set($dynamicsource = "$source$select")
## $dynamicsource is now the string '$source1'
#evaluate($dynamicsource)