type

Global

Global defines one singleton document in authoring configuration.

Properties

PropertyTypeDescription
Slugschema.CollectionSlugSlug is the URL-safe global name used by APIs and the admin.
LabelstringLabel overrides the author-facing name shown in navigation and headings.
LabelTranslationsmap[string]stringLabelTranslations overrides Label for configured admin interface languages.
AdminGlobalAdminAdmin is serializable presentation metadata consumed by the framework admin.
Fieldsfield.FieldsFields owns the global's immutable field shape, behavior, and presentation.
VersionsboolVersions enables revisions for this global.
VersionConfigVersionConfigVersionConfig customizes drafts, retention, and autosave behavior.
AccessGlobalAccessAccess defines read and update authorization.
HooksCollectionHooksHooks defines global-wide lifecycle behavior.
Endpoints[]EndpointEndpoints declares custom HTTP endpoints below /api/globals/<slug>. They run before matching built-in global routes for the same method.

Full signature

type Global struct { // Slug is the URL-safe global name used by APIs and the admin. Slug schema.CollectionSlug // Label overrides the author-facing name shown in navigation and headings. Label string // LabelTranslations overrides Label for configured admin interface languages. LabelTranslations map[string]string // Admin is serializable presentation metadata consumed by the framework admin. Admin GlobalAdmin // Fields owns the global's immutable field shape, behavior, and presentation. Fields field.Fields // Versions enables revisions for this global. Versions bool // VersionConfig customizes drafts, retention, and autosave behavior. VersionConfig VersionConfig // Access defines read and update authorization. Access GlobalAccess // Hooks defines global-wide lifecycle behavior. Hooks CollectionHooks // Endpoints declares custom HTTP endpoints below /api/globals/<slug>. // They run before matching built-in global routes for the same method. Endpoints []Endpoint }

Source core/config.go:221