Add the ability to lock/make exclusive patterns to template parts #47208
Labels
[Block] Template Part
Affects the Template Parts Block
Developer Experience
Ideas about improving block and theme developer experience
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Presently it does not seem to be possible to create patterns that should be unique to a specific template part.
Say I'm building a hybrid theme where I am only using template parts but not templates.
I have a template part for my footer and I want to present the user with two variations of that footer.
I could create two patterns that represents all the blocks and layout of each variation.
However those patterns does not make sense to expose outside the editing of this template part, they just become clutter for the user.
What is your proposed solution?
The ability to actually lock down a pattern to only appear in the context of to which part of Gutenberg it has been assigned.
We already have template locking for templates and individual blocks so to me it makes sense to utilise the same standard on this.
So similarly to how you can set
blockTypes
on registering a pattern you could also settemplateLock
.The text was updated successfully, but these errors were encountered: