pattern-directory icon indicating copy to clipboard operation
pattern-directory copied to clipboard

Add UI for blockType and postType

Open richtabor opened this issue 2 years ago • 0 comments

Page patterns are companions of blocks that together form a page layout, or design. They are leveraged within StartPageOptionsModal, as starter patterns you can use to quickly add whole page designs.

Registering a page pattern includes setting the blockType to core/post-content and setting the postType to `page. Here's how Twenty Twenty-Four does it. Block types are an array of blocks that the pattern is intended to be used with.

While we do have some behind-the-scenes workarounds here, for indicating core header and footer patterns, there is no interface.

I'd like to propose a method for registering a pattern's block type, and supported post type (post and page) within the pattern creation experience of the directory. That way a theme author can build headers, footers, and page designs in the pattern directory, and add them to themes via theme.json. Whereas the alternative is to include all of them within all themes individually.

richtabor avatar Oct 16 '23 17:10 richtabor