In a WordPress plugin I have created some custom 'layout' Gutenberg blocks. These are basically 'boxes' that contain the rest of the page contents. I'd like to restrict the user to adding only these boxes into a page, but then allowing them to place ANY child blocks within them.
I have found how to limit Gutenburg blocks using the allowed_block_types
filter. This works to just restrict the user to adding 'boxes' to a page.
I have then found how to limit a Gutenberg block to only allowing specific child blocks. i.e. on InnerBlocks, specify allowedBlocks: ['core/paragraph','core/list','core/seperator',...]
so that the 'boxes' can contains these child blocks.
The problem is that the allowed_block_type filter seems to override the allowedBlocks.
How can I allow specific blocks at 'page' level, and others at the 'child' level?