<transform transVar> ... </transform> or <transform transVar name1=value1 name2=value2 ... nameN=valueN> ... </transform>
transVar: Expression evaluates to a transform
nameN: Name of parameters. Literal value, not expression.
valueN: Expressions evaluate to the values of parameters
This directive is still working, but deprecated. You may want to read about user-defined directive calls to see the replacement.
Captures the output generated inside its body (i.e. between its start-tag and end-tag), and let the given transform modify it before it is written to the final output.
<p>A very simple HTML file: <pre> <transform html_escape> <html> <body> <p>Hello word! </body> </html> </transform> </pre>
the output will be:
<p>A very simple HTML file: <pre> <html> <body> <p>Hello word! </body> </html> </pre>
Some transforms may take parameters. The name and meaning of parameters depends on the transform in question. For example here we give a parameter called "var":
<#-- This transform stores the output in the variable x, rather than sending it to the output --> <transform capture_output var="x"> some test </transform>
It is the task of the programmers to put the necessary transforms into the data-model. For the name and usage of accessible transforms ask the programmers. Initially there is a shared variable for most transforms in the
freemarker.template.utility package. For more information see: Programmer's Guide/The Configuration/Shared variables