Add utility methods to scaffold e.g. single block server side #18218
bjarnef
started this conversation in
Features and ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When creating/updating content nodes service side it may fail, if the content type is using single block property (e.g. for a top banner/image) even though one don't care about this property when importing data.
#17817
From backoffice one won't notice as this is scaffolded client side via
blockEditorService.createModelObject()
.So it "magically" creates the required block data.
Same may happen if Block List / Grid requires a minimum amount of blocks.
Mainly when dealing with single blocks I think this can be simpler.
We can of course construct the JSON ourselves:
https://docs.umbraco.com/umbraco-cms/13.latest/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/block-grid-editor#creating-a-block-grid-programmatically
I probably think it is kinda missing an equivalent method service side for
CreateModelObject()
.. probably based on content type or optionally passing in ModelsBuilder modelCreateModelObject<T>()
.Beta Was this translation helpful? Give feedback.
All reactions