Build upgrade-friendly client themes and order forms.
Theme structure
templates/mytheme/
├── header.php
├── footer.php
├── homepage.php
├── dashboard.php
├── login.php
└── css/theme.css
Create a directory instead of editing templates/default. Missing templates fall back to default. Select the new theme in General Settings.
Variables
render_template() extracts controller variables and supplies $systemurl, $companyname, $active_theme, $flash_message, $client, $is_logged_in and hook output variables.
<h1>Welcome, <?= htmlspecialchars($client['firstname'] ?? 'Guest') ?></h1>
<link rel="stylesheet" href="<?= htmlspecialchars($systemurl) ?>templates/mytheme/css/theme.css">
Preview and order forms
Preview installed themes using ?systpl=mytheme. Order forms live under templates/orderforms/name/ and preview with ?carttpl=name. Preserve controller URLs, input names and CSRF fields.