Open klor opened 1 year ago
If you set "Allowed templates for children" to a value, then the step of chosing the template would be skipped, if you only referenced one child template. If you use multiple possible allowed templates for children, then you would still have to chose.
So I think it could be a good improvement.
This feature already exists. You use "template_id" in the URL to specify the ID of the template.
Example:
/processwire/page/add/?parent_id=1234&template_id=29
Adding &template_id=29
works like a charm <3, thanks @Toutouwai
Case closed (on my side, Ryan may have a comment)
PS: @ryancramerdesign - May I suggest that Admin url parameters are documented, something like:
https://www.example.com/processwire/page/?open=11994
https://www.example.com/processwire/page/edit/?id=12022
https://www.example.com/processwire/page/edit/?id=11888&language=1010
https://www.example.com/processwire/page/add/?parent_id=11994
https://www.example.com/processwire/page/add/?parent_id=11994&template_id=120
Yeah or maybe a blog post about all the available parameters would be nice!
Short description of the enhancement
As a webmaster, when I'm on the Skyscraper listing page and have the possibility to create a page using, say, Skyscraper, City, and Architect templates, then I want to click a link in the front-end navigation that allows editors to create a Skyscraper page directly, without having to choose template first (same for City and Architect).
This might be achieved by appending "?template=skyscraper" to the url (it seems this is currently not supported)
Current vs. suggested behavior
Current behavior:
When designing a ProcessWire site, I usually create a dropdown in the front-end that allow editors to quickly go to the Page Tree, Edit page, and add additional pages. Problem with adding pages is that I cannot specify the exact template to use. So, this is what the editor needs to do:
Step 1:
Step 2:
Suggested behavior
Step 1: Add direct "Add New Skyscraper"-links, yeah!
Why would the enhancement be useful to users?
Webmaster can create links in the frontend that makes it easier for novice user as well as lazy admins to create pages.
PS: ChatGPT think this is possilbe (or maybe I'm missing a setup step?)