# theme.json ```json { "title": "My Theme", "config": { "default_template": "full_content" }, "template": { "full_content": "full_content.twig", "left_sidebar": "left_sidebar.twig", "right_sidebar": "right_sidebar.twig", "custom1": "custom1.twig", "guide": "guide.twig" } } ``` ## Fields - `title` — Display name in admin - `config.default_template` — Default layout for pages without a `layout:` frontmatter (fallback for unknown layouts) - `template` — Mapping from layout name to `.twig` file ## Template mapping The `template` mapping defines which layouts are available. Each key is a layout name, each value is the `.twig` file: | Layout name | Twig file | Description | |-------------|-----------|-------------| | `full_content` | `full_content.twig` | Full width, no sidebar | | `left_sidebar` | `left_sidebar.twig` | Sidebar on the left | | `right_sidebar` | `right_sidebar.twig` | Sidebar on the right | | `custom1` | `custom1.twig` | Custom layout | | `guide` | `guide.twig` | Guide with sidebar (Navigation plugin) | ## Layout selection - Layouts are chosen via the frontmatter `layout:` key in content files - Unknown layouts fall back to `config.default_template` - `ThemeManager::getTemplates()` returns the template mapping - `ThemeManager::getConfig()` returns the config section (including `default_template`) ## Guide layout The `guide` layout is special for guides. `getGuidePage()` in `CodePressCMS.php` automatically injects the Navigation plugin into the metadata for sidebar navigation.