• For our own theme we are currently in the process of providing more complex elements (block compositions) to our content editors.

    We are aware of the block patterns and already have set up some of them to provide more sophisticated elements to be easily included in a page.

    I stumbled over another solution to provide a block composition of core blocks which is to create our own custom blocks which only act as a wrapper around a composition for core blocks using InnerBlocks.

    Since i didn’t find any official recommendation of using this method i wanted to ask for some opinions here because we see some advantages of using the custom block method.

    Does anyone see any problems with using this approach or any advantages of using the block patterns over custom blocks for this purpose?

    Some insights and opinions would be highly appreciated. Thanks a lot!

    <div {...useBlockProps()}>
        <InnerBlocks
          template={[
            [
              'core/media-text', {
                backgroundColor: 'light-grey',
              }, [['core/group', {}, [
                  ['core/paragraph', {content: 'Featured'}}}],
                  ['core/paragraph', {content: 'This is the content', align: 'center'}]
                ]
              ]]
            ]
          ]}
        />
    </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Block Patterns vs. Custom wrapper block’ is closed to new replies.