Directive Reference - Apache FreeMarker Manual

Unsupported web browser - Use a modern browser to view this website!

- Home
- Manual
- Java API

- Contribute
- Report a Bug
- Download

Manual

- Apache FreeMarker Manual
- Template Language Reference
- Directive Reference

Bookmarks:

- Alpha. index
- Glossary
- Expressions
- ?builtins
- #directives
- .spec_vars
- FAQ

Previous Next

# Directive Reference

Section Contents

- Alphabetical index
- assign
- attempt, recover
- autoesc
- compress
- escape, noescape (deprecated)
- flush
- ftl
- function, return
- global
- if, else, elseif
- import
- include
- list, else, items, sep, break, continue
- local
- macro, nested, return
- noautoesc
- noparse
- nt
- outputformat
- setting
- stop
- switch, on, case, default, break
- t, lt, rt
- User-defined directive (<@...>)
- visit, recurse, fallback

Previous Next

### Overview

- What is FreeMarker?
- Download
- Version history
- FAQ
- License
- Privacy policy

### Often used / Reference

- Try template online
- Expressions cheatsheet
- #directives
- ?built_ins
- .special_vars
- Configuration settings

### Community

- Github project page
- Report a bug
- Report security vulnerability
- Get help on StackOverflow
- Announcements on Twitter
- Discuss on mailing lists

- Github
- Twitter
- Stack Overflow

Edited with XMLMind XML Editor

Last generated: 2026-08-23 19:54:34 GMT, for Freemarker 2.3.35

© 1999–2026 The Apache Software Foundation. Apache FreeMarker, FreeMarker, Apache, the Apache feather logo, and the Apache FreeMarker project logo are trademarks or registered trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.