-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add home
to list of new templates
#47389
Conversation
Size Change: +86 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.
This works as advertised.
I assume it was avoided from the original list because of confusion around the name of this template: #44524
Regardless of the name change, I don't think it should prevent us from adding it here.
cc @jameskoster for a gut check and also the icon used.
I would dearly love to avoid using "Home" as a single-word title to reduce confusion with Front Page. Should we try "Blog home"? There's also scenarios that can make the application of this template really confusing. Specifically: homepage is set to display latest posts, and Front Page exists. In this case I don't think |
Yes, I think "Blog home" makes sense. Should we just overwrite the template name here, just for the editor? Or do you think this should be changed in Core first? I can try out overwriting the name in this PR, to see how it feels. Alternative names could be "Blog Posts" or "Blog Posts Index", as that's how it's described in the template hierarchy, but "Blog Home" sounds easier to understand.
Yeah, that's right, front-page.html always overwrites home.html.
I like this idea, could it work something like this: Blank theme:
Existing theme with a Blog Home (home.html):
Existing theme with a Front Page (front-page.html):
After reading that through, perhaps we just need to add the overwrite explanations to the template description? If we conditionally show these templates, it makes it more difficult for a user to add them. e.g. it would need to be obvious that Front Page needs to be deleted in order to add a Blog Home template. Or perhaps instead of the templates being conditionally shown, they're visible but disabled, with a note in the description saying why they're disabled. |
I feel that being able to add the template without code is more important. In the reading settings, the text for changing the content of the home page is Your homepage displays:
So maybe an option could be "Home: Latest posts" |
I quite like "Home: Latest posts". |
@paaljoachim You mentioned that working with the front page was confusing, do you have input on a name for the "Home" template? |
EDIT: This is the short version. What I find difficult is the Index template and how that is related to Latest posts template. This is the longer reponse. NB. I appologize for the length of my reply. I just had to.... First of all let's look at the description of the Home Template. "Displays posts on the homepage, or on the Posts page if a static homepage is set." Who is our audience? Developers? Common users who begins to use Full Site Editing? Home Template - In it's name it sounds like it is the front page template. Breaking a part the description (brainstorming the phrases being used.): "...or on the Posts page if a static homepage is set." What does that mean? I am again confused. A static homepage what is that? What is a dynamic page? Rethinking.... So the Home template can be used on the Blog page, but the theme Twenty Twenty Three has a Blog template (Alternative).....Hmmmm. Looking at the description again. So the Home template will be used on the home page actually front page if I decide to show posts on the front page. If I do not decide to show posts on the front page but on the Blog page called News then the Home template will be seen on the blog page. So the Home template is actually a Posts preview template that will be assigned to either the front page or the blog page depending on where the blog posts are seen. Now I got to do a video recording of the above.... As if feels like a play with words. Here is my video: |
The problem with calling it Latest Posts is that when someone goes looking for the file, it is still called home.html and that will also be confusing. |
Yes, as we're unable to change the name of the template, I think we need to keep "home" in the title somewhere so it relates to home.html. I think I still prefer "Home: Latest posts". Thanks for your insights, @paaljoachim! I agree that how these templates work is confusing, especially when the template names are surfaced in the site editor.
The index template is the default fallback for all templates, so if a home.html or front-page.html doesn't exist, and the reading settings are set to show the latest posts, then the index.html template is used. |
Should template names have a specific consistency of something like this? I believe we will need to open a new issue where we in general go through Template names. Thinking consistency, language and making these names as logical as possible of what they accomplish. So most users can look at the template names and understand what they do and which template they need to edit. |
What about calling it Latests Posts but mentioning home.html in the description? |
So this part is pretty confusing and blurs the clarity of what the Home and Front Page templates are. The Front Page template is straight forward meant to display the homepage. |
The template hierarchy limits what can be done. There is no way around that it actually is called home. |
It is so very important to use template names/titles we see be as logical as possible. How they were used earlier (coding) and how these will be used today (visual UX/UI) is very different. |
I wonder if there's an opportunity for design to explore alternative implementations for this particular template. Presented as a template it's confusing, largely because all user interactions center around it behaving like a page. IE it can be your home page, or your posts page. Consequently, it might be worth trying a design that surfaces it in a more intuitive location, e.g. the Pages list, where it can have a more sensible name based on its application. It's worth noting that this goes for other templates like In that sense this feels related to #44461. |
I would love to see this merged and added to core. I spent way to long this morning trying to understand how to set up the blog posts page in FSE. The posts page defined in the reading settings defaults to index which I would never use for this template. You can't add Home confusingly in the editor so the only way to add it is manually create the html file. I couldn't find this documented anywhere either so complete guesswork. It is crucial this can be added via the site editor going forward IMO. I am also very up for being more explicit in the template name as discussed above instead of simply using 'Home' which is always confusing. |
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.
Perhaps we can merge this now the description has been updated, and update the name separately. The name may even be less of an issue if we can tackle #48651.
The icon needs some attention, but it's probably ok to tackle that separately too.
I think this needs a rebase for the final two playwright tests to pass? |
Thanks for merging this, @carolinan! |
Thanks @carolinan, a great addition! 😀 |
What?
Adds 'Home' (home.html) to the list of templates that can be added in the Site editor.
Why?
Closes #46325.
The Home template is often used in themes, and without it being included in the default list of templates, it needs to be created manually outside of the Editor.
However, I'm not sure if this highlights the confusion around the Front Page and Home templates too much. This is an existing problem, but perhaps listing the templates so close to each other is even more confusing. Still, I think it would be good to allow this template to be added without needing to leave the Editor. It would be great to know what everyone thinks.
How?
Adds
home
toDEFAULT_TEMPLATE_SLUGS
, and uses thepostList
icon for the Home icon.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast