Transform directive

Page Contents


<transform transVar>
<transform transVar name1=value1 name2=value2 ... nameN=valueN>




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:
<transform html_escape>
    <p>Hello word!

the output will be:

<p>A very simple HTML file:
    &lt;p&gt;Hello word!

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

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

FreeMarker Manual -- For FreeMarker 2.3.20
HTML generated: 2013-06-27 20:54:33 GMT
Edited with XMLMind XML Editor