Content & Formatting
Content Model Reference
The conceptual overview of Articles/Pages/Projects lives in Understanding Content Types — this page is the field-by-field schema, for theme and plugin code that reads $item directly or works with sl_load_index()/sl_load_item() (see Data Layer).
Common fields
Present in both the lightweight index (_index.json) and the full item file:
| Field | Type | Notes |
|---|---|---|
slug | string | Auto-generated from the title |
custom_slug | string | Manual override — sl_effective_slug($item) returns whichever is set |
title | string | |
date | string | Y-m-d or Y-m-d H:i |
category | string | A single category slug, or empty |
tags | array | Tag slugs |
image | string | Relative path, e.g. files/photo.jpg |
image_alt | string | Alt text for the featured image |
author_id | string | Owning user account's ID |
show_in_menu | bool | Include in the auto-generated menu |
menu_order | int | 0–999, used by manual menu sort |
status | string | published, draft, scheduled, unpublished — see below |
publish_at | string | Scheduled publish datetime; empty when not scheduled |
show_date | bool | Display toggle for the publish date |
Full item file only
| Field | Type | Notes |
|---|---|---|
content | string | Raw HTML or Markdown source — never display without render_content_html() |
content_format | string | html (default) or markdown |
last_modified | string | Updated on every save |
meta_title, meta_description, meta_keywords | string | SEO overrides |
canonical_url | string | Manual canonical override |
schema_type | string | JSON-LD schema.org type override |
og_title, og_description, og_image | string | Open Graph overrides — can differ from the meta/featured-image equivalents |
show_title, show_featured_image | bool | Display toggles |
galleries | array | Named inline galleries — see Image Galleries |
custom_fields | object | Keyed by field key — see Custom Fields |
show_related_items | bool | See Related Content |
related_items | array | [{type, slug}, …] — empty array means auto mode |
Per-type extra fields
| Type | Extra fields |
|---|---|
| Article | summary, show_on_homepage |
| Project | description, show_on_homepage |
| Page | page_template |
status values
| Value | Meaning |
|---|---|
published | Live on the front end |
draft | Never published, or explicitly saved as a draft |
scheduled | Has a future publish_at — sl_promote_scheduled() flips it to published automatically once that time passes, on the next front-end request |
unpublished | Was published, then explicitly taken down (the Unpublish action) — distinct from draft so its history and public link stay intact |
Where these fields come from
sl_admin_index_fields(string $type): array (core/admin-data-layer.php) is the authoritative list of what goes into the index for a given type — the common fields above plus that type's extras. If you're adding a plugin filter on item_before_save (see Filters) and need a value available in list views without loading the full item, it needs to be in that function's return array, not just on the full item.
