-
Notifications
You must be signed in to change notification settings - Fork 123
Template selection #100
Comments
We’d remove these templates as “templates” as well, right? I don’t think we need them front and center here, and as template types. We may want them to show up when you add a new page too (without header and footer). |
Can we remove the home.html template? It conflicts with the settings saved in WordPress dashboard > Settings > Reading and can confuse the users. |
Perhaps we need a quick play-by-play on the options we can use for the main page, and how those will interplay with the templateTypes selection above. |
Or we can change home.html to front-page.html? |
Both |
This issue would let us swap out entire templates: WordPress/gutenberg#51347 |
I do not understand in what way the home template conflicts with the reading settings, as mentioned above. It is the template used to display the blog. |
@carolinan Go to Settings >> Reading and select A static page option for Your homepage displays. Assign pages for Homepage and Posts page. Check both the homepage and blog post page. I think one of them will not work as expected. |
I made the test, and both the blog and the actual front page display the correct content. |
@carolinan In Settings > Reading, I set a static page as my Homepage and my “Blog” page as the Posts page. However, instead of displaying my posts, my Blog page shows a page about architecture (the same page as the homepage of https://2024.wordpress.net/). So, if a user switches their theme to Twenty Twenty-Four, their website will initially display content that is not theirs. |
That does not happen on my installation. Please first try to reset any changes you have made to templates, and make sure you are using the latest version of the theme. |
Make sure that no other template is "assigned" to the page called "Blog". |
I'm testing with Twenty Twenty Four trunk without making any changes to the theme on a fresh WordPress installation. The Blog Home template's description is |
And I do see the content of home.html. I am still confused. I think it is working as expected. It is just a matter of different expectations since the template uses the patterns. |
@MaggieCabrera It may be good to try templateTypes out with the We may need to have a portfolio page pattern with header and footer parts, so it's a proper full replacement — whereas currently the portfolio page pattern is just the content (like other page patterns). We may need both (which shouldn't be a heavy lift, as we're building with pattern blocks anyhow). For testing we can just add a new template. |
Unpopular opinion: Maybe they should just be child themes. |
Not really unpopular, it's another very valid way of doing the same thing. It's still valid that a theme may want to include different versions of a same template (it's something commercial themes have done very often too in the past). I think having this problem means having this discussion, so that's a good thing. @richtabor definitely we can add |
They're just different page designs; I don't think it's child theme territory. |
@MaggieCabrera In my testing we need to remove "Post types: page" from template patterns (related: WordPress/gutenberg#45859), then they show up in the template choose a pattern selector. And we need to do this:
CleanShot.2023-09-11.at.11.38.33.mp4I just used "page" as a template type for the video, but front-page could work maybe. |
By removing the template files and by removing full page designs that are similar but are intended to have a different context and footers, it feels like the concept of three different use cases is abandoned. There is no easy way for users to switch both site building templates like the search results page and their content templates (page, post) to the same style: There is no way to switch all templates at once without child themes. I don't agree that having template files in the Site Editor is confusing. And it is not more confusing than having things like the 404 template show up in the page list... I also don't think that having a portfolio template for a non-portfolio site is confusing. If the naming is the problem, then lets rename it. For example, all custom page and post templates could be clearly named custom, optional, or alternative: Custom site building templates (custom archives, index, search) can remain patterns since there is no easy way to replace them without deleting the blocks in the existing template). But I have lots of opinions and I think that the decision must be based on how @luminuu and @MaggieCabrera wants the theme to work. |
Imagine you have three 404 templates. That’s the comparable here. |
I see this. I get that the list of templates should ideally should show one of each possible option, and then the alternatives should be shown some place else. This is the first time we are offering alternatives to other than the page/single templates, so we are risking polluting that list even more than previous default themes. We need to strike a balance between discoverability and overwhelming the user where he's not expecting. I'm in the fence here, I think we've already built the expectation of some of the variations to be there (like no title or blank, it feels like we've been adding those templates since forever), but we probably shouldn't push that too much. |
What I was originally thinking of how these different content approaches could be implemented was something like this: These separate templates would have been a dropdown or something and would replace the entire existing template at once. Any default WP view (archive, categories, 404, single) could have multiple different options, or just one default. This would prevent the current "Page Portfolio", "Page Writer" etc on the main templates overview. But I guess it's now too late already to get something like this done. |
This will be closed by WordPress/gutenberg#54609, which is a blessed task |
While it does work with Beta 3, I found out in my testing yesterday it's not working anymore with the latest Gutenberg version installed, I opened an issue: WordPress/gutenberg#55218 |
The idea for this theme is to have three possible use cases, hence why we have multiple options for templates like home, page or single. Right now there is no easy way in WordPress to swap an existing template with an alternative provided by the theme in a way that is not manually emptying/deleting the existing template and redoing it. There are some designs explorations for this flow on WordPress/gutenberg#36951 (comment) and I've discussed this with @richtabor during WCUS and we thought that we could make use of the tools that already exist for Block Patterns.
The idea would be to register these alternate versions of the templates as patterns and make use of templateTypes to assign the template that should use this pattern. This already works well for creation of new pages, but we are missing the flow for replacing.
The text was updated successfully, but these errors were encountered: