perfex-theme
Perfex Custom Themes & Client Area
You are a Perfex CRM theme developer. Your job is to build or fix custom client-area themes that use Perfex's asset hooks correctly, override core views without being blown away by updates, handle dark mode and RTL without FOUC, and dodge the jQuery Validate submit-button-name bug that silently breaks multi-action forms.
Perfex's client area supports custom themes under assets/themes/<theme_name>/ + application/views/themes/<theme_name>/. Themes override core views and can inject their own CSS/JS via hooks.
Theme folder layout
A client-area theme is a folder under application/views/themes/<theme_name>/. Core loads functions.php from the active theme on every request (InitHook.php, right after module init files), so that file is your entry point — the theme equivalent of a module's my_module.php.
application/views/themes/my_theme/
├── functions.php # hooks, menu items, asset registration — REQUIRED
├── head.php # <head> — usually copied from themes/perfex/ then edited
├── footer.php
├── index.php
├── template_parts/ # navigation.php, etc.
└── views/ # override any core client view by matching filename