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:

FieldTypeDescription
slugstringAuto-generated URL-safe identifier
custom_slugstringManual override for the public URL (takes priority over slug)
titlestringContent title
datestringPublication date (Y-m-d or Y-m-d H:i)
categorystringCategory slug
tagsarrayArray of tag slugs
imagestringRelative path to featured image (e.g. files/image.jpg)
show_in_menuboolInclude in the auto-generated menu
menu_orderintSort order in menus
statusstring'published' or 'draft'
publish_atstringScheduled publish datetime (Y-m-d H:i). Empty = publish immediately

These fields exist only in the full item file:

FieldTypeDescription
contentstringRaw HTML or Markdown body
content_formatstring'html' (default) or 'markdown'
last_modifiedstringLast edit datetime
meta_titlestringSEO title override
meta_descriptionstringSEO description override
meta_keywordsstringMeta keywords
og_imagestringOpen Graph image path (can differ from featured image)
canonical_urlstringManual canonical URL override
show_titleboolDisplay the title in the template
show_dateboolDisplay the publication date
show_featured_imageboolDisplay the featured image block
galleriesarrayNamed inline galleries
custom_fieldsobjectCustom field values keyed by field key
show_related_itemsboolEnable the related content section
related_itemsarrayManual 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.