Files
CodePress/guide/nl/theme-developer/theme-json.md
T
E.Noorlander b38be8366c 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
2026-08-12 12:05:53 +02:00

1.6 KiB

theme.json

{
    "title": "Mijn Thema",
    "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"
    }
}

Velden

  • title — Weergavenaam in admin
  • config.default_template — Standaard layout voor pagina's zonder layout: frontmatter (fallback bij onbekende layouts)
  • template — Mapping van layout naam naar .twig bestand

Template mapping

De template mapping definieert welke layouts beschikbaar zijn. Elke key is een layout naam, elke value is het .twig bestand:

Layout naam Twig bestand Beschrijving
full_content full_content.twig Volledige breedte, geen sidebar
left_sidebar left_sidebar.twig Sidebar links
right_sidebar right_sidebar.twig Sidebar rechts
custom1 custom1.twig Custom layout
guide guide.twig Handleiding met sidebar (Navigation plugin)

Layout keuze

  • Layouts worden gekozen via frontmatter layout: key in content bestanden
  • Onbekende layouts vallen terug op config.default_template
  • ThemeManager::getTemplates() geeft de template mapping terug
  • ThemeManager::getConfig() geeft de config sectie terug (inclusief default_template)

Guide layout

De guide layout is speciaal voor handleidingen. getGuidePage() in CodePressCMS.php injecteert automatisch de Navigation plugin in de metadata voor zijbalk navigatie.