Templates
SLAED CMS uses a flexible template system that allows you to completely change the look of your site without modifying the core system code.
Table of Contents
Theme Structure
Each theme is located in a separate folder in the templates/
directory:
templates/
├── default/ # Default theme
│ ├── index.html # Main page template
│ ├── basic.html # Basic content template
│ ├── title.html # Title template
│ ├── pagenum.html # Pagination template
│ ├── block-*.html # Block templates
│ ├── *.html # Specialized templates
│ ├── theme.css # Theme CSS
│ ├── system.css # System styles
│ ├── blocks.css # Block styles
│ └── images/ # Theme images
└── custom_theme/ # Custom theme
├── index.html
└── ... # Other theme files
Main Templates
The main template defines the overall page structure:
<!DOCTYPE html>
<html lang="{%lang%}">
<head>
<meta charset="UTF-8">
<title>{%title%}</title>
<link rel="stylesheet" href="templates/{%theme%}/theme.css">
</head>
<body>
<header>
<h1>{%sitename%}</h1>
<p>{%slogan%}</p>
</header>
<nav>
<!-- Navigation -->
</nav>
<main>
{%content%}
</main>
<aside>
{%blocks%}
</aside>
<footer>
<p>© 2026 {%sitename%}</p>
</footer>
</body>
</html>
Template Placeholders
{%lang%}
- Site language (ru, en, de, etc.){%title%}
- Page title{%sitename%}
- Site name{%slogan%}
- Site slogan{%content%}
- Main page content{%blocks%}
- Site blocks{%theme%}
- Current theme name
Block System
Block types:
- l - Left column
- r - Right column
- c - Center area
- d - Bottom of page
- s - Floating blocks
- o - Floating blocks (alternative)
Template API
Key template functions:
// Basic template function
function setTemplateBasic($tpl, $values = '') {
global $theme, $conf;
// Implementation
}
// Block template function
function setTemplateBlock($tpl, $values = '') {
// Implementation
}
// Warning template function
function setTemplateWarning($tpl, $settings) {
// Implementation
}
Creating Custom Themes
To create a custom theme:
- Create a new folder in
templates/
with your theme name - Create the main template files
- Add CSS styles
- Customize HTML structure
CSS Optimization
SLAED CMS supports CSS optimization:
- CSS compression
- File merging
- Minification
- Browser caching