Jump to content

Add Template Enhancements


Robin S
 Share

Recommended Posts

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.

2018-09-27_171722

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/AddTemplateEnhancements
https://modules.processwire.com/modules/add-template-enhancements/

  • Like 11
  • Thanks 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...