-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
FSE Navigation sidebar: Show single post template in posts templates #28229
FSE Navigation sidebar: Show single post template in posts templates #28229
Conversation
Size Change: +1 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works! Two observations:
- The template is empty – should it be?
- Can we add the Post template to the top level of template navigation, rather than inside the "Posts" section?
|
If we have a default for
I can't find the issue now but we discussed also moving the The reasoning behind for this suggestion is that the We don't have to do it in this PR though :) FWIW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and this works as advertised. This looks consistent to me 👍 - I think its more up to you whether we want to re-arrange what shows up where here or in a follow up.
FWIW single should certainly not be in the "Posts" section, since that template can also resolve for pages.
The description for single
says: "Used when a single entry that is not a page is queried" - so it doesn't seem to be intended for pages. Maybe we are confusing it with the general template "singular"?
You're correct. |
You are not alone. 🤣 I didn't remember the difference either until i went looking for it and saw the description. |
For the record, this is why I would advocate not offering these templates as options in the (+) menu at all. They're difficult to understand, and probably best left for themers to use at their discretion. "Page" (
|
They do at least have the accurate description there though. It does enable a good flow for those themers. I would suspect most non themers would rather get a theme that supplies these templates than create them themselves or wouldn't need to use this "+" flow option. But even in the case they do the descriptions should definitely help guide them. |
I think the existing setup should handle this situation and fall back to the more generic template that handles the rendering of |
ed46ec2
to
35547a3
Compare
35547a3
to
6f25b59
Compare
So, it seems there is an unrelated issue on template creation: the template is created correctly, with the correct fallback content (retrieved with this function — we might want to add a I'm looking into it. 👍 |
Description
Show
single-post
template in the posts menu.How has this been tested?
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: