-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Post editor: Template panel should adapt when explicit template exists #41452
Comments
This pretty much feels like a bug at the moment. After creating a template for a specific post I can actually change which template is applied when editing that post, which undermines the specific template logic altogether. |
I tried to solve this in components> sidebar > post-template but I got stuck because the |
@noisysocks has been working with the template panel recently, perhaps it's something he can look into? 🙏 |
What happens if the post already has a template that was created using the post editor sidebar? |
That is a very good question, and I am once again humbled by the template hierarchy 🙈 Currently templates created in the post editor are So actually the current behavior of the template panel is correct – I am able to select a $custom template, or the template that was created for that specific post. The flow of creating a template for a specific post and not applying it feels a bit strange, but that's something to explore separately. I'll close this issue. |
It's definitely confusing 😅 I don't really like that we have two flows to accomplish what amounts to the same thing. |
Turns out the explicit template is applied automatically, but only when a custom template hasn't been applied. Re-opening and updating the OP :D |
Follow up to #41189.
When a template exists that automatically resolves to display a specific post or page (e.g.
single-post-$slug
), the Template panel in the post editor will need some adjustments when editing the corresponding post:If we added a delete action it should invoke a confirmation modal that explains which template will be used after deletion.
Edit: To clarify, the explicit template is only applied automatically if a
$custom
template has not been applied previously. So the UI above should only be presented when no$custom
templates exist at all.The text was updated successfully, but these errors were encountered: