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

New template flow in the post editor: Ask the creator whether the template should be reusable or specific #30865

Closed
jameskoster opened this issue Apr 15, 2021 · 4 comments
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor Needs Design Needs design efforts.

Comments

@jameskoster
Copy link
Contributor

In the current flow...

new.template.mp4

... $custom templates (that can be applied to any content) are created. But in some cases a user might want the new template to only be used by the post / page being edited. E.G a cart or checkout template.

It also seems plausible that a specific template could be the expected result in this flow, so we might make that the default behaviour.

Specific templates do not exist yet, and present some architectural requirements:

  • It should not be possible to select a specific template in the template selector, unless editing the associated post / page
  • When editing a post / page that has a specific template, the user must be made aware that changing this template will result in the specific template being deleted
@jameskoster jameskoster added Needs Design Needs design efforts. [Feature] Templates API Related to API powering block template functionality in the Site Editor [Feature] Full Site Editing labels Apr 15, 2021
@carlomanf
Copy link

Specific templates do not exist yet, and present some architectural requirements:

They do exist, through the single-$posttype-$slug pattern.

@jameskoster
Copy link
Contributor Author

Sorry I meant they do not exist in the site editing UI. Unless I am mistaken there is no way to create a specific template yet, outside of manually creating a .html file in your theme?

@carlomanf
Copy link

The latest version of trunk does expose the template post type in the Appearance menu, but there is also a long-unsolved bug that prevents the user setting their own slug, so on a practical level you are right. I do still like the added convenience of this proposal, but the single-$posttype-$slug pattern should definitely be used to implement it rather than any other means.

@jameskoster
Copy link
Contributor Author

I don't think this needs a dedicated issue, we can explore it generally as a part of #31591.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor Needs Design Needs design efforts.
Projects
None yet
Development

No branches or pull requests

2 participants