type
BlockAdmin
Configure a block row label; every block also has an ordinary blockName Text field in its header.
Example
cta := field.Block{
Slug: "cta",
Admin: field.BlockAdmin{RowLabelPath: "heading"},
Fields: field.Fields{
field.Text("blockName").Label("Internal name"),
field.Text("heading").Required(),
},
}Properties
| Property | Type | Description |
|---|---|---|
RowLabelPath | string | Optional direct stored scalar child used as a row summary. This does not change the blockName header input or its Untitled placeholder. |
How it works
Every resolved block has a direct plain Text blockName child. Ridu adds it with an empty-string default when omitted from Fields. Declare field.Text("blockName") to customize its default, validation, access, visibility or localization; slug and custom editors are not allowed.
The guarded header input uses Untitled as its empty placeholder and is omitted from the body. Names use ordinary child storage and API exposure, with no automatic uniqueness, slug or URL-anchor behavior.
Rich-text cards use the same header input, with undo/redo support. Editing drawers include the name in their detached draft: Apply commits it with the other fields and Cancel discards it.
Full signature
type BlockAdmin struct {
// RowLabelPath names a direct stored scalar child; empty values use the block type label.
RowLabelPath string
}