> For the complete documentation index, see [llms.txt](https://sevenval.gitbook.io/flat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenval.gitbook.io/flat/reference/templating.md).

# Templating

FLAT's template language is intended to dynamically generate JSON documents.

Basically, you provide the skeleton of the JSON object you want to create, and use *placeholders* instead of literal values. The language supports *template commands* that are documented below. *Template expressions* and [functions](/flat/reference/functions.md) offer rich means of accessing request and response data in JSON, HTML or XML ([OXN](/flat/reference/templating/oxn.md)).

## [Comment `{{// <comment>}}`](/flat/reference/templating/comment.md)

## [Placeholder `{{ <expression> }}`](/flat/reference/templating/placeholder.md)

## [Dot `{{.}}`](/flat/reference/templating/dot.md)

## [Comma `{{,}}`](/flat/reference/templating/comma.md)

## [Pair Producer `{{: <expression> }}`](/flat/reference/templating/pair-producer.md)

## [Variable Definition `{{$<name> := <expression> }}`](/flat/reference/templating/variable.md)

## [Conditional `{{if <condition>}} … {{elseif <condition> }} … {{else}} … {{end}}`](/flat/reference/templating/if.md)

## [Loop `{{loop <array>}} … {{end}}`](/flat/reference/templating/loop.md)

## [Context Switch `{{with <expression>}} … {{else}} … {{end}}`](/flat/reference/templating/with.md)

## [Null Coalescing Operator `??`](/flat/reference/templating/null-coalescing-operator.md)
