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

Lock entire FSE templates and template parts #36008

Open
iandunn opened this issue Oct 27, 2021 · 7 comments
Open

Lock entire FSE templates and template parts #36008

iandunn opened this issue Oct 27, 2021 · 7 comments
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. [Type] Enhancement A suggestion for improvement.

Comments

@iandunn
Copy link
Member

iandunn commented Oct 27, 2021

What problem does this address?

Theme authors will want to lock entire FSE templates and template parts in some situations.

There are some related issues, but I wasn't able to find any for that specific purpose:

What is your proposed solution?

  • theme.json could have an attribute for making a template or part always be locked:

    "templates": [
    	{
    		"name": "single",
    		"locked": true
    	}
    ]
    "customTemplates": [
    	{
    		"name": "page-home",
    		"locked": true
    	}
    ]
    "templateParts": [
    	{
    		"name": "header",
    		"locked": true
    	},
  • template parts could have an inline attribute, so they can be locked in some cases and not in others.

     <!-- wp:template-part {"slug":"footer","locked":true} /-->

Eventually, more granularity could be added, like "locked": [ "move", "delete" ], but true/false would be a good start.

@aurooba
Copy link
Member

aurooba commented Feb 23, 2023

Popping in here merely to say that I am working on a theme and I really wish this capability existed already.

@abhi3315
Copy link
Contributor

Hey, @iandunn 👋🏻
I would like to contribute to this issue. Are there any latest updates so far?

@iandunn
Copy link
Member Author

iandunn commented Feb 24, 2023

Not that I'm aware of. The Gutenberg team needs to decide if it's something they want to implement, and what the architecture should look like.

@anarieldesign
Copy link

As a theme author this would be a huge help as our users are mostly confused and frustrated with templates and would be great to be able to lock them in some situations

@annezazu annezazu added the [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. label Jun 7, 2023
@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") and removed [Feature] Full Site Editing labels Jul 24, 2023
@rielyncampbell
Copy link

I would like to chime in that this would be extremely beneficial to me as well. Having the ability to lock these parts from being moved, removed, or edited in any way by anyone but a super admin would be perfect. I manage a multisite network of over a thousand sites with authors everywhere on the spectrum of skills. We have a standard banner and styles across all of the sites that we have to lock down given our self-publishing set up. I am currently developing a new theme to update our platform. Please take a serious look at this. Thank you.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Sep 14, 2023
@hojtfredrik
Copy link

+1!
I am building a Saas based on themes and FSE and need to limit what can be customized by the client.

@carolinan
Copy link
Contributor

template parts could have an inline attribute, so they can be locked in some cases and not in others.

This is already works
<!-- wp:template-part {"slug":"header","area":"header","tagName":"header","lock":{"move":true,"remove":true}} /-->

@ndiego ndiego added the [Feature] Extensibility The ability to extend blocks or the editing experience label Aug 28, 2024
@ndiego ndiego moved this to Needs discussion in Increase Gutenberg Extensibility Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Focus] Blocks Adoption For issues that directly impact the ability to adopt features of Gutenberg. [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs discussion
Development

No branches or pull requests

10 participants