JavaScript for WordPress Forums Gutenberg Development Custom Column Block Gutenberg 3.0 – Using InnerBlocks with pre-nested blocks Reply To: Custom Column Block Gutenberg 3.0 – Using InnerBlocks with pre-nested blocks

#48893
mengland
Participant

Zac,

Thanks for replying, I did some additional research into more files and eventually I found something that actually works and is really simple to include!

InnerBlock List has the following elements inside of it. <BlockList { ...{ layouts, allowedBlocks, template } } />.

In my example code we already utilized layouts, so I started experimenting with template. Using the example PHP I was able to fabricate a working version for having a block with a template inside.

          <InnerBlocks
            layouts={ [
              { name: 'column-1', label: 'Column 1', icon: 'columns' },
            ] }

           template={ [
            [ 'core/paragraph', { layout:'column-1', placeholder:'temp-stuff' } ],
           ] }

          />

I’m now really interested in experimenting with allowedBlocks.