Update all guides (NL + EN) for CodePress 2.5.2 features
- 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
This commit is contained in:
@@ -2,20 +2,45 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "My Theme",
|
||||
"default_layout": "full_content",
|
||||
"header_color": "#0a369d",
|
||||
"layouts": {
|
||||
"full_content": "full_content.twig",
|
||||
"left_sidebar": "left_sidebar.twig",
|
||||
"right_sidebar": "right_sidebar.twig"
|
||||
}
|
||||
"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
|
||||
- `default_layout` - Default layout for new pages
|
||||
- `header_color` - Admin sidebar color
|
||||
- `layouts` - Mapping of layout names to .twig files
|
||||
- `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.
|
||||
Reference in New Issue
Block a user