# Migration URL: /docs/theming/templating/kida/migration/ Section: migration -------------------------------------------------------------------------------- Migration Most Jinja2 templates work without changes in Kida. Migrate incrementally to use unified {% end %} blocks, pattern matching, and pipeline operators. Note that Kida does not support all Jinja2 features (notably {% macro %}—use {% def %} instead). If you need full Jinja2 compatibility, use the Jinja2 engine by setting template_engine: jinja2 in your config. Migration Strategy Compatibility Mode — Existing Jinja2 templates work as-is Gradual Migration — Convert templates incrementally as you edit them Full Migration — Use Kida syntax throughout Quick Syntax Changes Jinja2 Kida {% endif %}, {% endfor %} {% end %} {% set x = ... %} {% let x = ... %} {% if %}...{% elif %} {% match %}...{% case %} | selectattr('key', 'eq', val) |> where('key', val) | sort(attribute='key') |> sort_by('key') | default(value) ?? value (simple) Note Note Template Functions: where and sort_by are Bengal template functions (not Kida built-ins) that are automatically available in all templates. They work with both \| (Jinja2-style) and \|> (Kida pipeline) operators. Topics From Jinja2 Convert existing Jinja2 templates to Kida syntax -------------------------------------------------------------------------------- Metadata: - Author: lbliii - Word Count: 178 - Reading Time: 1 minutes