This document provides comprehensive context about Total CMS 3 for content creation, documentation writing, training material development, and marketing purposes.
Total CMS 3 is a modern, flat-file Content Management System built with PHP 8.2+. It uses JSON storage instead of a traditional database, making it lightweight, portable, and easy to deploy. Built on the Slim 4 framework with Twig 3 templating, it provides both a full admin interface and a RESTful API.
Total CMS works with any front-end tooling — whether that's hand-coded HTML, a visual site builder like Stacks, or a JavaScript framework consuming the REST API. It provides the content management backend while staying agnostic about how the front end is built. For Stacks users specifically, there are dedicated CMS stacks for every content type, plus stacks for looping through collections. Twig syntax can also be used inside native stacks for deeper integration.
- No database required — flat-file JSON storage, nothing to configure
- Simple installation — drop the
tcmsdirectory on the server; Stacks users get automatic deployment - 13 built-in content types — blog, image, gallery, depot, and more
- Custom schemas — design your own content types (Pro edition)
- Powerful admin interface — form builder with 30+ field types
- Twig templating — 130+ filters, 60+ functions for dynamic content
- REST API — headless CMS capability (Pro edition)
- JumpStart — export/import system for quick project setup and migration
- ImageWorks — on-the-fly image processing with watermarking
Total CMS is available in three editions. Each higher tier includes everything from the tier below it.
Best for: Simple sites needing basic content management.
Content types: Text, Styled Text, Image, Gallery, Color, Date, Email, Feed, File, Code, Number, SVG, Toggle, URL
Features:
- Admin dashboard with content editing
- Dynamic image processing (ImageWorks basics)
- Playground for template testing
- CMS Grid tag for content layouts
- Factory test data generation
- RSS feeds and sitemaps
- CSV and JSON export
- JumpStart export/import
- PHP API for server-side scripting
- Utilities: Cache Manager, Image Batcher, Job Queue Manager, Log Analyzer, Pretty URL Builder
Form actions: Redirect, Refresh, Back, Redirect to Object
Best for: Client sites needing blogs, file management, and email.
Everything in Lite, plus:
- Blog content type — full blogging with categories, tags, author, featured images
- Depot content type — file repository with folders, drag-and-drop, password protection
- Templates — reusable content layout templates
- Mailer — email notifications from forms
- Access Groups — user permission management
- Image watermarks — protect client photos with image overlays
- QR code generation
- Basic whitelabel — brand the admin for clients
- Additional form fields: List, Multi-Select, Multi-Checkbox, Depot field
Best for: Agencies and complex sites needing custom content types and integrations.
Everything in Standard, plus:
- Custom schemas — design unlimited custom content types
- Deck field — repeatable content blocks within objects
- REST API — expose content via REST endpoints for headless CMS use
- API keys — secure token-based API authentication
- Webhooks — trigger external services when content changes
- Text watermarks — overlay custom text on images with font control
- Barcode generation
- Full whitelabel — completely rebrand the admin interface
- PHP automation — full TotalCMS.php class for CLI scripting
Collections are the core data containers. Each collection uses a schema that defines its fields and behavior.
| Schema | Edition | Description |
|---|---|---|
| Text | Lite | Plain or formatted text content |
| Styled Text | Lite | Rich text with WYSIWYG editor (TipTap) |
| Image | Lite | Single image with EXIF metadata, alt text, focal point, tags, rating, color palette |
| Gallery | Lite | Image gallery with drag-and-drop ordering |
| File | Lite | Single file upload with metadata and password protection |
| Code | Lite | Code snippets with syntax highlighting |
| Color | Lite | Color values in hex and OKLCH formats |
| Date | Lite | Date/datetime values |
| Lite | Email addresses with validation | |
| Feed | Lite | Social media/activity feed posts |
| Number | Lite | Numeric values |
| SVG | Lite | SVG graphics with automatic XSS sanitization |
| Toggle | Lite | Boolean on/off values |
| URL | Lite | Web addresses with validation |
| Blog | Standard | Full blog posts with title, content, categories, tags, author, dates, featured image, gallery |
| Depot | Standard | File repository with hierarchical folders, drag-and-drop, access control |
| Custom | Pro | User-defined schemas with any combination of fields |
Each collection has configurable settings including:
- URL patterns — pretty URLs or query parameter style
- Sorting — sort by any field, manual sort orders
- Access control — public operations (read/create/update/delete), group restrictions
- Categories — organize collections in the dashboard
- Schema overrides — customize field labels, help text, and options per collection
- Object overrides — customize field settings per individual object
- Form behavior — post-save actions, help text style, error summaries
Total CMS includes 30+ form field types for building content entry forms.
- text — single-line input with pattern validation
- textarea — multi-line input with configurable rows
- email — email with validation
- phone — international phone number
- password — with automatic confirmation field
- url — web address with validation
- hidden — stores data without displaying
- select — dropdown with relational options support
- multiselect — multi-value dropdown (Standard+)
- radio — radio button group with grid layout
- multicheckbox — checkbox group with grid layout (Standard+)
- list — add/remove multiple items (Standard+)
- date — date picker
- datetime — date and time picker with auto-population on create/update
- time — time-only in 24-hour format
- image — upload with EXIF extraction, focal point, watermarking, validation rules
- gallery — multiple images with drag-and-drop ordering
- file — file upload with password protection and download tracking
- depot — multi-file/folder management (Standard+)
- styledtext — WYSIWYG rich text editor
- code — syntax-highlighted editor (HTML, CSS, JS, PHP, Twig, Markdown, etc.)
- svg — SVG editor with automatic sanitization
- color — color picker with hex and OKLCH
- number — numeric with min/max/step
- price — currency-formatted number with currency icons
- range — slider input
- toggle — boolean on/off switch
- rating — star rating with count tracking
- deck — repeatable content blocks with custom sub-schemas (Pro)
- json — raw JSON editor
- Visibility conditions — show/hide fields based on other field values
- Relational options — pull dropdown options from other collections
- Validation rules — file size, image dimensions, aspect ratio, file types
- ID auto-generation — templates with variables like
${title},${now},${uuid} - Watermark settings — per-field image/text watermark configuration
On-the-fly image manipulation via URL parameters:
- Resize and crop — width, height, fit modes, focal point cropping
- Format conversion — JPEG, PNG, WebP, GIF output
- Effects — blur, sharpen, pixelate, grayscale, sepia, brightness, contrast
- Image watermarks — overlay images with position, size, padding, transparency (Standard+)
- Text watermarks — overlay text with custom fonts, size, color, background, angle (Pro)
- EXIF metadata — automatic extraction of camera data, GPS, and more
- Color palette — automatic color extraction from images
Full-featured file browser and manager (Standard+):
- Hierarchical folder structure
- Drag-and-drop file uploads
- Keyboard navigation
- File filtering and search
- File preview modals
- Password protection per file
- Access group restrictions
- Auto-saving file metadata
- Folder rename and organization
Complete blogging platform (Standard+):
- Title, content, excerpt, categories, tags
- Author management
- Featured images and galleries
- Publish dates with scheduling
- RSS feed generation
- Category and tag filtering
- Search functionality
- Pagination
Project blueprint system for quick setup:
- Export all collections, schemas, settings, and metadata
- Import into new projects instantly
- Factory system — generate test data with Faker instead of storing real content
- Factory rules: words, sentences, paragraphs, names, emails, dates, numbers, images, tags
- Media files (images, uploads) are excluded from exports to keep packages lightweight
- Great for project templates, demo data, and client onboarding
Form-triggered email system (Standard+):
- SMTP configuration
- Customizable email templates
- Triggered as form actions on content save
- Multiple mailer configurations
- Duplicate existing mailers
User permission management (Standard+):
- Define user groups with specific permissions
- Control access to collections, schemas, templates, settings, and utilities
- Per-method access control (GET, POST, PUT, DELETE)
- Public vs authenticated access settings
- Collection-level and object-level restrictions
Admin interface branding:
- Basic (Standard): Login page customization, welcome messages, download auth branding
- Full (Pro): Custom logo, admin home replacement, CSS/JS injection, complete interface rebranding
- Template-based with full Twig support
- Dashboard widgets macro for consistent UI
Multi-backend caching for performance:
- Priority order: APCu → Redis → Memcached → Filesystem
- OPcache automatic when available
- Admin UI with hit rates and memory usage
- Per-backend clearing
- Emergency clearing endpoint (
/emergency/cache/clear) for customer self-service
Total CMS provides extensive Twig templating capabilities accessible via the global cms variable and custom filters/functions.
The primary interface for accessing CMS data in templates:
Content Access:
cms.text('id')— plain textcms.styledtext('id')— rich HTML contentcms.image('id', imageworks)— image tag with optional processingcms.imagePath('id', imageworks)— image URL onlycms.gallery('id', thumbSettings, fullSettings)— full gallery with lightboxcms.galleryImage('id', 'filename')— individual gallery imagecms.download('id')— file download linkcms.depot('id')— depot file listingcms.color('id')— color with hex and OKLCH propertiescms.date('id'),cms.number('id'),cms.toggle('id'),cms.url('id'),cms.email('id'),cms.svg('id'),cms.code('id')
Collection Queries:
cms.objects('collection')— all objects from a collectioncms.object('collection', 'id')— single object by IDcms.data('collection', 'id', 'property')— specific property valuecms.objectCount('collection')— efficient cached countcms.search('collection', 'query', 'property')— search across propertiescms.property('collection', 'property')— unique values for a propertycms.collections()— all collectionscms.collection('name')— collection metadata
Configuration:
cms.env— current environmentcms.config('key')— configuration valuescms.domain— current domain
Authentication:
cms.userLoggedIn()— check login statuscms.userData()— current user datacms.userHasAccess()— permission checkcms.login()— login URLcms.logout— logout URL
Utilities:
cms.prettyUrl('/path')— generate pretty URLscms.paginationFull(total, page, limit)— full paginationcms.paginationSimple(total, page, limit)— prev/next pagination
Text: markdown(), markdownInline(), truncate(), truncateWords(), wordcount(), readtime(), humanize(), titleize()
Dates (natural language support): dateFormat(), dateRelative() (e.g., "2 days ago"), dateAdd(), dateSubtract(), dateDiff(), dateIsPast(), dateIsFuture(), dateIsToday()
Collections (performance-optimized): keyBy() (lookup tables), groupBy(), countBy(), pluck(), sum(), avg(), min(), max(), filterCollection() (40+ operators), sortCollection()
Colors: hex(), rgb(), hsl(), oklch(), lightness(), chroma(), hue(), adjustColor()
Formatting: price() (currency formatting), filesize() (human-readable sizes), mailto() (obfuscated email links)
Encoding: htmlencode(), urlencode(), encrypt(), decrypt()
Custom Twig tag for rendering collection content in grid layouts:
{% cmsgrid objects from 'blog' with 'compact gap-md' as 'article' %}
{{ object.title }}
{% endcmsgrid %}getData— URL query parameterspostData— POST datasessionData— session dataqr— QR code generation (Standard+)barcode— barcode generation (Pro)factory— Faker test data generation
JSON-based RESTful API for headless CMS use.
- API Keys — header (
X-API-Key) or query parameter (api_key) - Session auth — same-origin with CSRF token
GET /api/collections— list all collectionsGET /api/collections/{name}— list objects with filtering and paginationPOST /api/collections/{name}— create objectGET /api/collections/{name}/{id}— get single objectPUT /api/collections/{name}/{id}— replace objectPATCH /api/collections/{name}/{id}— partial updateDELETE /api/collections/{name}/{id}— delete objectGET /api/schemas— list schemasGET /api/schemas/{name}— schema definition
/api/download/{collection}/{id}/{property}— force download/api/stream/{collection}/{id}/{property}— inline streaming/api/imageworks/{collection}/{id}/{property}.{format}— processed images
- Rate limiting with headers
- Pagination headers
- CORS support
- Comprehensive error codes
Server-side PHP interface for page rendering and automation.
Initialize TotalCMS at the top of any PHP file, write HTML, then call processBufferMacros() to render Twig expressions within the page content. This allows mixing standard HTML/PHP with Twig CMS tags.
The TotalCMS.php class exposes services for programmatic content management:
- Reading:
indexReader(),objectFetcher(),schemaFetcher() - Writing:
objectSaver(),objectUpdater(),objectCloner() - Deleting:
objectRemover() - Deck items:
deckItemSaver(),deckItemUpdater(),deckItemRemover(),deckItemFetcher() - Media:
fileSaver(),imageSaver() - Email:
mailer() - Jobs:
jobRunner() - Cache:
clearCache(),disableCache() - Logging: named loggers for custom log channels
- Collection overview with object counts
- Quick access to all collections organized by category
- Utilities panel
- Documentation browser with search
- Auto-generated forms based on schemas
- 30+ field types with validation
- Form error summaries
- Customizable post-save actions (redirect, refresh, etc.)
- Status banners for success/error states
- Cache Manager — view hit rates, memory usage, clear by backend
- Image Batcher — bulk image processing
- Job Queue Manager — background task monitoring
- Log Analyzer — view and download error logs
- Pretty URL Builder — generate Apache/Nginx rewrite rules
- Playground — test Twig templates in a sandbox environment
- JumpStart — export/import project data
- Project Setup — import from other CMS platforms (Total CMS 1, Alloy CMS)
- Flat-file storage — no SQL injection risk
- HTML sanitization — automatic XSS prevention on all content
- SVG sanitization — removes malicious content from SVG uploads
- CSRF protection — token validation on all forms
- Session management — secure PHP sessions with regeneration
- File upload validation — type, size, extension, MIME checking
- Password hashing — secure bcrypt hashing
- Access groups — granular permission control
- Content-Security-Policy — frame-ancestors support for iframe embedding
- Emergency cache clearing —
/emergency/cache/clearendpoint
Total CMS 3 is used by:
- Web designers and developers building client websites with any front-end tooling
- Stacks users — the largest existing community, with dedicated CMS stacks for every content type
- Freelancers and agencies managing multiple client sites
- Front-end developers using JavaScript frameworks who want a headless CMS via the REST API
- Content creators who need an intuitive admin interface without database complexity
- Stacks — dedicated CMS stacks for every content type, collection loop stacks, automatic deployment
- Hand-coded HTML/PHP — use Twig syntax or the PHP API directly in any page
- JavaScript frameworks — consume the REST API (Pro) for headless CMS architecture
- Any site builder — Twig templating works with any tool that outputs HTML on a PHP server
- Collection — a container of content objects (like a database table)
- Schema — defines the fields and structure of a collection (like a table schema)
- Object — a single content item within a collection (like a database row)
- Property — a field value within an object (like a column value)
- Depot — a file repository collection with folder support
- Deck — a repeatable set of sub-objects within a single object
- ImageWorks — the image processing engine
- JumpStart — the data export/import system
- Factory — test data generation using Faker
- Playground — the admin's Twig template testing sandbox
- Pretty URLs — SEO-friendly URL rewrites for collection pages
- Whitelabel — admin interface branding customization