type
Block
Block is one discriminated layout allowed by a blocks field.
Properties
| Property | Type | Description |
|---|---|---|
TypeName | string | TypeName optionally names a reusable generated type family; it never changes the stored slug. |
Slug | string | Slug is the stable discriminator stored with block values. |
Labels | BlockLabels | Labels overrides the singular and plural names shown to authors. |
Fields | Fields | Fields defines the values stored by this block type. |
Admin | BlockAdmin | Admin configures this block type in the framework admin. |
Full signature
type Block struct {
// TypeName optionally names a reusable generated type family; it never changes the stored slug.
TypeName string
// Slug is the stable discriminator stored with block values.
Slug string
// Labels overrides the singular and plural names shown to authors.
Labels BlockLabels
// Fields defines the values stored by this block type.
Fields Fields
// Admin configures this block type in the framework admin.
Admin BlockAdmin
}Methods
Block.Snapshot()Snapshot returns a detached block, copying child fields and label translations. Executable callbacks retain their original behavior.