t, lt, rt

Synopsis

<#t>

<#lt>

<#rt>

Description

These directives, instruct FreeMarker to ignore certain white-space in the line of the tag:

where:

It is important to understand that these directives examine the template itself, and not the output what the template generates when you merge it with the data-model. (That is, the white-space removal happens on parse time.)

For example this:

--
  1 <#t>
  2<#t>
  3<#lt>
  4
  5<#rt>
  6
--

will output this:

--
1 23
  4
  5  6
--

The placement of these directives inside the line has no importance. That is, the effect will be the same regardless if you put the directive at the beginning of the line, or at the end of the line, or in the middle of the line.

上一章 首页 下一章