- 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
2.6 KiB
2.6 KiB
Theme management
Managing themes
- Go to Theme in the admin menu
- Activate — Choose the active theme (stored in
config.json) - Compile SCSS — Process SCSS to CSS (forced)
- New theme — Create a custom theme via admin or manually
Theme structure
themes/default/
├── theme.json # { title, config.default_template, template: layout→.twig }
├── base.twig # Main layout (head, header, nav, breadcrumb, footer)
├── full_content.twig # Layout: full width
├── left_sidebar.twig # Layout: sidebar on the left
├── right_sidebar.twig # Layout: sidebar on the right
├── custom1.twig # Layout: custom
├── guide.twig # Layout: guide with sidebar (Navigation plugin)
├── partials/ # header.twig, navigation.twig, footer.twig
└── assets/
├── scss/theme.scss # SCSS source (only CSS source — manual css/theme.css must not exist)
├── css_compiled/ # Generated by scssphp (read-only, do not edit manually)
├── css/ # External CSS (bootstrap.min.css, bootstrap-icons.css, mobile.css)
├── js/ # app.js, bootstrap.bundle.min.js
├── fonts/ # bootstrap-icons.woff, woff2
└── img/ # favicon, icon, world-map
theme.json
{
"title": "default",
"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"
}
}
title— Display name in adminconfig.default_template— Default layout for pages without alayout:frontmattertemplate— Mapping from layout name to.twigfile
SCSS compilation
ThemeManagercompilesassets/scss/theme.scssat runtime toassets/css_compiled/theme.cssvia scssphpcss_compiled/is read-only — do not edit manuallyassets/css/theme.cssmust not exist; otherwiseThemeManager::getCssUrl()ignores the SCSS- After SCSS changes: remove
assets/css_compiled/theme.cssand.mtimeto force recompilation
Layouts
Layouts are chosen via the frontmatter layout: key in content files. Unknown layouts fall back to config.default_template from theme.json.
guide.twig
Special layout for guides. Injects the Navigation plugin into the sidebar for sidebar navigation. Automatically used for pages in the guide/ folder.