type

BlocksField

The allowed discriminated layouts for a blocks field.

Properties

PropertyTypeDescription
BlockReferences[]stringThe BlockReferences value.
MinRowsintThe MinRows value.
MaxRowsintThe MaxRows value.

Full signature

type BlocksField struct { BlockReferences []string `json:"blockReferences,omitempty"` MinRows int `json:"minRows,omitempty"` MaxRows int `json:"maxRows,omitempty"` // contains filtered or unexported fields }

Source schema/manifest.go:645

Methods

  • BlocksField.Definition()

    Definition returns the block type that slug selects, as Definitions does.

  • BlocksField.Definitions()

    Definitions returns the block types a row may select without creating placement views: each is its shared definition view, the same values at every placement, with definition-relative paths and IDs and this placement's inherited locale scope, whose nested containers also yield definition views. Work keyed by these values is therefore proportional to block definitions. The result is shared and read-only.

  • BlocksField.ResolvedTypes()

    ResolvedTypes returns placement views: each selected block's fields carry this placement's resource path and stable IDs. A materialized view is kept for the life of the schema, so traversing every placement costs time and memory for every path through the block graph. Processing that needs only field structure uses Definitions instead.