Robin S Posted October 13, 2017 Share Posted October 13, 2017 This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now. Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead. Add Template Enhancements A module for ProcessWire CMS/CMF. Adds some efficiency enhancements when adding or cloning templates via admin. Features Derive label from name when new template added: if you like to give each of your templates a label then this feature can save some time. The label can be added automatically when templates are added in admin, in admin/API, or not at all. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage Install the Add Template Enhancements module. Configure the module settings according to what suits you. https://github.com/Toutouwai/AddTemplateEnhancementshttps://modules.processwire.com/modules/add-template-enhancements/ 11 1 Link to comment Share on other sites More sharing options...
alxndre Posted October 14, 2017 Share Posted October 14, 2017 Thanks for this great module, @Robin S! Can i request to add this as I still think this is useful, and it fits within your module: 1 Link to comment Share on other sites More sharing options...
Robin S Posted October 14, 2017 Author Share Posted October 14, 2017 Thanks for the feedback @alxndre. The module is about better efficiency for the "Add Template" workflow, and I don't think sorting the page list is related to that. I'd like to keep this module fairly focused rather than becoming a collection of general admin tweaks (we already have a great module for that). I agree with Soma's request though. He says his solution is a "dirty hook" but it actually looks very clean to me. I don't think I could come up with anything cleaner so I suggest sticking with Soma's solution. It doesn't need to be added in a module now that we have /site/ready.php. 1 Link to comment Share on other sites More sharing options...
Robin S Posted November 2, 2017 Author Share Posted November 2, 2017 On 15/10/2017 at 5:13 AM, alxndre said: Can i request to add this as I still think this is useful, and it fits within your module: @alxndre, I just stumbled upon this module and remembered your post - perhaps it is useful to you? https://modules.processwire.com/modules/process-page-list-multiple-sorting/ Link to comment Share on other sites More sharing options...
Robin S Posted September 27, 2018 Author Share Posted September 27, 2018 v0.1.1 released - adds an option to automatically derive a label from the template name if a new template is added via the API. Also finally got around to submitting it to the modules directory. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now