Theme Development
Themes control the visual presentation of the Pubvana public-facing site. A theme is a collection of .tpl template files, CSS, JavaScript, images, and a JSON manifest. No PHP is allowed in theme directories — all logic is in core controllers and services; the theme only handles presentation.
What Themes Control
- HTML structure for all page types (home, post, page, category, tag, archive, search)
- CSS framework and class names (Bootstrap 5, Tailwind, custom — your choice)
- Widget area definitions and CSS class mapping
- Theme-specific configurable options
What Themes Do NOT Control
- Authentication or access control
- Data fetching or database queries
- Plugin functionality
- Admin panel appearance (always SB Admin 2)
Requirements
theme_info.json— manifest (required)views/layout.tpl— master layout (required)- Seven page-type templates:
home.tpl,post.tpl,page.tpl,category.tpl,tag.tpl,archive.tpl,search.tpl
What This Section Covers
- Getting Started — minimum viable theme
- Theme Structure — full directory tree
- theme_info.json Reference — complete manifest schema
- Template Engine Basics — .tpl syntax introduction
- Layout & Hierarchy — how templates inherit from layout.tpl
- Available Variables — all variables in each template
- Widget Areas — declaring and rendering widget slots
- CSS Class Mapping — the semantic class system
- Theme Options — configurable settings with auto-generated admin UI
- Partials & Includes — reusable template fragments