§3
Manifest
- `theme.php`
The file only returns an array. It cannot contain PHP code (function calls, variables); the validator rejects it and the file is never executed.
php
<?php
declare(strict_types=1);
return [
'name' => 'my-theme', // same as the folder name
'area' => 'client',
'title' => ['tr' => 'Benim Temam', 'en' => 'My Theme'],
'version' => '1.0.0',
'requires' => ['wiacp' => '>=0.2.0-alpha.68'],
'author' => 'Company',
'contract' => 1, // theme contract version
'layout_mode' => 'shared', // shared | separate
'color_modes' => ['light', 'dark', 'system'],
'source_locale' => 'en', // language of language.php
'settings' => [ /* Themes › Site › Settings form */ ],
'sections' => [ /* home page sections, §6 */ ],
];
layout_mode
| Region | shared |
separate |
|---|---|---|
| Public pages | header + page + footer | same |
| Client panel | header + page + footer | clientheader + page + clientfooter |
| Login / registration | authheader / authfooter if present, otherwise header / footer | same |
A page that does not want the wrapper writes @layout('none') on its first line and starts from <!doctype html>.
settings fields: key, type (color, select, boolean, text, string, number), default, label, help, options (select), translatable (text per language), max_length. Values arrive in templates as $theme['key']; per-language fields arrive as a single text in the active language.