API / Apache FreeMarker Interview questions
Define directive in FreeMarker?
A directive is an FTL instruction, written inside <# ... > tags, that controls how the template is processed rather than directly producing a value. Directives can branch (<#if>), repeat (<#list>), declare variables (<#assign>), define reusable blocks (<#macro>), or pull in other templates (<#include>).
This is different from an interpolation such as ${user.name}, which simply evaluates an expression and inserts its text into the output. Directives shape the flow of the template; interpolations produce the actual text.
More Related questions...