- Admin guide: RBAC roles, role-based dashboard, plugin types (content/system) - CodePress developer guide: plugin types, admin plugin API, SCSS compilation, asset serving - Theme developer guide: SCSS sole CSS source, css_compiled read-only, guide layout - Content manager guide: layout selection from theme.json, plugin order in frontmatter - Both NL and EN updated with identical structure - 35 files updated
1.6 KiB
1.6 KiB
theme.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 adminconfig.default_template— Default layout for pages without alayout:frontmatter (fallback for unknown layouts)template— Mapping from layout name to.twigfile
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 mappingThemeManager::getConfig()returns the config section (includingdefault_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.