JustFlows

Документация пока доступна только на английском языке. Остальная часть сайта соответствует вашему языку.

Content

Posts, pages, and custom types: create, edit, publish, translate, keep working revisions, and recover from the trash.

8 минута чтения

Admin → Content lists entries by type. Create from New, edit metadata on /admin/content/:id, and open the visual builder at /admin/content/:id/builder. Dashboard tiles also jump to a new post or page.

Types

`post` and `page` ship as built-in types and cannot be deleted. Admin → Content types (/api/content-types) persists additional slugs and field definitions per site. Field kinds: text, textarea, richtext, number, boolean, media, date, select. Reserved keys seoTitle, seoDescription, seoCanonical, and seoImage belong to built-in SEO — do not reuse them on a custom type.

POST /api/content accepts any registered type slug. Custom fields are stored on the row as JSON and shown in the editor. You cannot delete a built-in type, or a custom type that still has entries.

Each content type has a Cache-Control setting in Admin → Content Types: inherit the site default, never cache, or a validated custom header. A single post or page can override it under Advanced. See Caching.

Content type settings

Content → Content Types lists every type in a table. Opening one shows a two-column editor for its labels, description, cache policy, system fields, and custom fields. Field settings expand in place, fields can be reordered, and you are warned before leaving with unsaved changes. Existing types keep their previous behaviour until you save an override.

SettingWhat it does
Label / plural labelThe plural label names the type in the overview.
Content editorAutomatic (the type or plugin default), the block builder, or custom fields. Existing blocks and fields are kept. Plugins can still choose through content.editor.
Dashboard shortcutAdds a New shortcut to the dashboard. On for posts and pages; other types opt in.
Revision historyCaptures new restore points. Turning it off keeps old history, working drafts, autosave, version checks, and scheduling.
Draft previewsAllows staff previews and shareable preview links, including links already sent.
Public searchInherit the site setting, or always include or exclude the type from site search. Admin search always includes it.
SEO metadata and sitemapShows the SEO panel, renders its tags, and lists published entries in the sitemap. Turning it off is not noindex and does not restrict access.
CommentsInherit the site default, on by default, or off for the whole type. Off wins over an entry's own setting.
Cache-ControlInherit the site policy or set one for the type. Account and sign-in types never cache.

Account and sign-in types cannot turn on public search, SEO, or comments. The content-type endpoints accept and return a settings object, stored per site by migration 0050_content_type_settings.

Statuses

The admin API accepts draft, published, archived, and scheduled. Publishing is available to administrators, editors, and authors. Authors can edit their own items; administrators and editors can delete any.

Scheduled publish

scheduled is accepted on PATCH. A job name content.publish-scheduled exists on the jobs package; the CE server does not yet register a cron publisher. Treat scheduled as a status you set, not an automatic go-live clock.

Translations

POST /api/content/:id/translate with { locale } clones the item into a translation group (translation_group_id, per-row locale from migration 0002). List filters: type, status, slug, locale, translationGroupId, limit, cursor.

Admin API

MethodPathPurpose
GET/api/contentList (session, content roles).
POST/api/contentCreate (type must be a registered slug).
GET/api/content/:idOne item.
PATCH/api/content/:idUpdate metadata, status, blocks, fields.
DELETE/api/content/:idDelete.
POST/api/content/:id/translateClone into another locale.
GET / POST / PATCH / DELETE/api/content-typesList and manage type definitions (write: administrator).

Saves invalidate the content: cache prefix. Hooks: content.beforeCreate / beforeUpdate / beforeDelete / beforePublish (gates), then content.created / updated / deleted / published / unpublished (actions). Filters content.input, content.output, and content.render sit on the way in, out, and onto the public HTML.

Revisions and taxonomies

Every content type keeps working revisions. Saving a published item writes a draft without touching the live version — visitors keep seeing what is published until you explicitly publish, which copies the working revision across atomically. The Revisions panel lists the last five published versions and can restore one as a draft; you can preview, compare, and discard drafts. The content list shows “Published — draft changes” while a draft is waiting. Categories, tags, and custom taxonomies are managed under Content → Categories & Tags and assigned in the editor sidebar; see Categories, tags, and taxonomies.

Note

Deleting content moves it to the Trash, where it can be restored with its revisions intact until the retention job purges it.