# Templater Configuration Documentation The templating engine supports flexible customization of tag syntax parameters. Each parameter can be overridden in the configuration file. Below are the main groups of parameters with usage examples and configuration notes. ## Legend --- ## General Parameters - **Open Brace** A non-empty string marking the beginning of a tag. *Example:* `{%` - **Close Brace** A non-empty string marking the end of a tag. *Example:* `%}` - **Null Handler** A non-empty string used to specify alternative content when a value is null. *Example:* `%%` --- ## Section Tags Parameters defining syntax for blocks controlling loops or nested structures. - **Prefix** Marks the start of a section (e.g., loops). *Example:* `for ` | *(Empty)* - **Suffix** Delimiter between variables and collections. *Example:* ` in ` | `#` - **Optional Suffix** Additional modifier, e.g., for joining collections. *Example:* ` join ` | `#` - **Post-Suffix** Finalizes the section declaration block. *Example:* `do ` | `:` *Section Example:* ```tpl {% for item in items do {% item.name %} some text {% for inner_item in item.inner_items join '\n' do
some other text
{% inner_item %} %%value
" } ] } ``` ## Function Tags **Note:** Currently not included in C library; implemented as a wrapper on applicable platforms. Enables calling functions with arguments. - **Prefix** Denotes a function call. *Example:* `call` | *(Empty)* *Function Example:* ```tpl {% call my_function(arg1, arg2, 'literal') %} ``` ## Notes - **Unique Tags:** `Open Brace`, `Close Brace`, and `Null Handler` must be distinct. - **Nested Constructs:** Supported. - **Unclosed Tags:** Must return an error. - **Missing Fields/Functions/Templates:** Configurable to either return an error or warning. - **Circular Includes:** Detect when possible. - **No Shadowing:** Variables defined in section tags must not conflict with context variable names, otherwise, return an error.