Thought experiment: Fields conditional on structure key #106
Labels
cms structures
Related to the generation of structures for hydrating the CMS
enhancement
New feature or request
Workshopping flexible components, picturing a component definition like the following:
Available as a nested component:
In this example, the
alignment
key might not make sense to exist on both components. To resolve this, one could imagine a hypothetical syntax:Available as a nested component:
In this world, the hero component would have the
alignment
key when used as a top level component in acontent_blocks
array, but this key would be absent when used in aninner_blocks
array.Theoretically, something along these lines could be achieved with an input config of
type: hidden
, assuming a similar capability of defining_inputs
per structure key. This would provide a key that exists in the data but is not shown to editors, but that doesn't solve the case where one would like the key to be absent altogether.Overall this needs more thought, but this puts together some of my current brain-scratchings.
The text was updated successfully, but these errors were encountered: