Content Types
SynaptikCMS has three built-in content types: Articles, Pages, and Projects. Each maps to a folder in /data/ with an index file and individual item files.
Common fields (all types)
These fields are stored in both the lightweight index and the full item file:
| Field | Type | Description |
|---|---|---|
slug | string | Auto-generated URL-safe identifier |
custom_slug | string | Manual override for the public URL (takes priority over slug) |
title | string | Content title |
date | string | Publication date (Y-m-d or Y-m-d H:i) |
category | string | Category slug |
tags | array | Array of tag slugs |
image | string | Relative path to featured image (e.g. files/image.jpg) |
show_in_menu | bool | Include in the auto-generated menu |
menu_order | int | Sort order in menus |
status | string | 'published' or 'draft' |
publish_at | string | Scheduled publish datetime (Y-m-d H:i). Empty = publish immediately |
These fields exist only in the full item file:
| Field | Type | Description |
|---|---|---|
content | string | Raw HTML or Markdown body |
content_format | string | 'html' (default) or 'markdown' |
last_modified | string | Last edit datetime |
meta_title | string | SEO title override |
meta_description | string | SEO description override |
meta_keywords | string | Meta keywords |
og_image | string | Open Graph image path (can differ from featured image) |
canonical_url | string | Manual canonical URL override |
show_title | bool | Display the title in the template |
show_date | bool | Display the publication date |
show_featured_image | bool | Display the featured image block |
galleries | array | Named inline galleries |
custom_fields | object | Custom field values keyed by field key |
show_related_items | bool | Enable the related content section |
related_items | array | Manual related items ([{type, slug}, …]). Empty = auto mode |
Articles
Blog-style entries. Listed in reverse-chronological order by default.
Additional index fields: summary, show_on_homepage.
Pages
Static content — About, Contact, Legal notices, etc. Not date-driven; ordered manually via the menu builder.
Additional index field: page_template (custom PHP template from theme/{active}/page-templates/).
Projects
Portfolio-style entries. Rendered separately from articles and pages, typically in a grid layout.
Additional index fields: description, show_on_homepage.
Effective slug
$effectiveSlug = $item['custom_slug'] ?: $item['slug'];
Always use sl_effective_slug($item) rather than reading either field directly.
Scheduled publication
When publish_at is set to a future datetime, the item is stored with status: 'draft' until that time. On each front-end request, sl_promote_scheduled() is called automatically by sl_build_data_array() and promotes any item whose publish_at has passed by updating both the index and the item file on disk.
Never display $item['content'] directly. Always pass it through rendercontenthtml($item['content'], $item) to resolve shortcodes, galleries, and Markdown conversion.
