Writing Templates with Twig

Total CMS uses Twig for templating. Inside any builder template, you have access to the cms global — your gateway to collections, configuration, and dynamic content.

Common patterns

  • cms.collection.objects('blog') — fetch all blog posts
  • cms.data.raw('blog', params.id) — fetch a single post
  • cms.config('domain') — read a config value

The Twig Playground lets you experiment with templates without committing changes.