Hello Plone Community,
I hope you're all doing well. I have a question regarding customizing content creation in Plone. I've been working on a project where I'd like to enhance the user experience by automatically populating specific content types with predefined Volto blocks upon creation. This way, users can start their content following a certain pattern without having to manually add the same set of blocks every time.
For instance, when creating a "News Item" content type, I'd like to auto include the Lead Image block.
Similarly, for a custom content type that I've created, I want to auto-create a set of blocks to help users adhere to a consistent content structure.
I'm wondering if there's a built-in feature or an extension that can help achieve this goal. Has anyone in the community attempted something similar or can offer guidance on how to approach this?
Enable the "editable layout" setting for you content type, in the Control Panel > Content types. In the edit page with blocks, add the "default blocks" and save that page, it will serve as a template for the new instances of your content type.
Thank you @tiberiuichim . That's exactly what I was looking for.
I encountered some issues when trying to add the Lead Image Field to the News Item default layout using the Volto UI. However, I managed to achieve this by editing the XML Field Model using the Classic UI.
However, the schema for my custom content type is defined in Python code. Therefore, I was unable to edit it through-the-web (TTW). Are there any examples or guidance available on how to establish a default blocks layout using Python code?
While I consider the possibility of converting my content type to use an XML schema, having insight into both methods would be greatly valuable.