Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg templates - Ability to restrict removal of template blocks #2632

Closed
sc0ttkclark opened this issue Aug 31, 2017 · 5 comments
Closed
Assignees
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@sc0ttkclark
Copy link

I'd really like to be able to ensure a Gutenberg template is locked from modification. I'd like them to be able to add blocks around the template as necessary, but the template itself I'd like to have those blocks locked from being removed themselves.

Is there a config I should use for that, or is it not supported?

@mtias mtias added [Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take labels Aug 31, 2017
@mtias
Copy link
Member

mtias commented Aug 31, 2017

It's not yet supported, but makes total sense. I'd imagine it would be a locked: true prop during registration. The block would not get movers nor be deletable, but its content still editable. Would that match your need?

@BE-Webdesign BE-Webdesign self-assigned this Aug 31, 2017
@BE-Webdesign
Copy link
Contributor

BE-Webdesign commented Aug 31, 2017

I've been working on this for a client, and think I have come up with some reasonable ideas to implement block templates. "locked" blocks are a part of that system, as well as deleteable: false.

@sc0ttkclark
Copy link
Author

Exactly! Also, the ability to lock the the whole template down from adding any new blocks. But that may be separate from this.

@sbangnielsen
Copy link

Great idea. What would be really superb though is if something like position: bottom or position: top could be added.

If it was possible to add obligatory, non-deletable, non-moveable blocks either above or below the content area it would be a big step towards enabling the replacement of all metaboxes with blocks.

@youknowriad
Copy link
Contributor

I'm closing this in favor of #1684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

5 participants