InnerBlocks
in action
'my-blocks/page-content'
multiple: false
template: [ 'core/paragraph' ]
templateLock: false
allowed_blocks
: Any blocks that you want to be allowed in this section
Between the time I recorded the WPCampus presentation and the time I delivered it,
I learned that the “Group” block (core/group
) supports the templateLock
property, and it can be set to override the templateLock
value of its parent.
If you wanted to create the page layout from our example, but do not need to restrict the Flexible area to specific blocks, there is no need to use a custom block. You can use this template setup instead:
This will allow you to lock the position of the main content blocks, but the group block will be unlocked, essentially creating a new content editor nested inside your template.