Optional programmatic default blockName field #4648
Replies: 6 comments
-
Beta Was this translation helpful? Give feedback.
-
|
No one interested in this? I think this feature is crucial for the usability and clarity of the CMS. Blocks are often used to create complex structures, and the information identifying a block is often already contained within the internal fields. We also have several use cases where it is useful to generate a blockName from multiple internal fields, but people either don't use it or are bored with re-entering the same information. In my opinion, this change would add a lot of value for the end user. What do you think? |
Beta Was this translation helpful? Give feedback.
-
|
It's super useful, for example in sanity you can do that. https://www.sanity.io/docs/previews-list-views |
Beta Was this translation helpful? Give feedback.
-
|
This still gets regularly raised as a bug, both internally and from clients. Having to explain "Payload doesn't support this" fairly often at this point |
Beta Was this translation helpful? Give feedback.
-
|
This is supported, it just wasn't well documented. Please see the changes in the documentation from: #13782 |
Beta Was this translation helpful? Give feedback.
-
|
That isn't even a good solution to this. I don't see why we can't just set the damn blockName. I can't go a week without finding some weird decision in payload. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
It would be great to be able to define a programmatic default
blockNamepattern, usage similar toadmin.components.RowLabel.My thinking is that a block's
blockNamewould default to the generated output of a given function while the input is empty - automatically updating each time the block's data updates.blockNamecould still be overridden in the UI, which would break the link between it and the generator function. When cleared the input is cleared, it would default back to the provided function output.Example:
Beta Was this translation helpful? Give feedback.
All reactions