plainblack.com
Username Password
search
Bookmark and Share
Template Usage  (#10659)
Issue

I started a new branch the other day called "template_usage" that adds a couple of things for working with templates:

  • replace a template with another template (site-wide)
  • find out where a template is being used

From the Edit Template screen, I added two new options: "Namespace Usage" and "Instance Usage" (see the screenshots).

Instance Usage shows you a list of all assets that are currently using the template.

Namespace Usage shows you all assets that include the template's namespace in their definition, and related info such as the hoverHelp for that field, etc.. In other words, this is a list of where the asset *could potentially* be used.

Across the top of the page are two drop-downs:

  • The first lets you jump to any other template in the same namespace
  • The second lets you globablly replace the template with another one, e.g. everywhere the template is being used, change it to use another template. This essentially lets you decommission a template (to a certain extent).

The big thing missing from this is that it only considers assets. Colin mentioned that he has some code that lets you query *everything* in wg that uses definition() - e.g. not just Assets but also site settings, etc.. That should allow us to extend this RFE to cover pretty much everywhere a template can be used. Perhaps we won't be able to get full coverage, but it will certainly make the process of reviewing and decommissioning a template less error-prone.

The other feature I want to add is a third drop-down which lets you diff the template against any other template in the same namespace. The obvious application of this is for diffing your custom template against the default template (e.g. after an upgrade). The stumbling block here is that there doesn't seem to be a good cpan module for generating diff output to html.

I implemented this on a whim because we were about to do some template changes, so the code is somewhat lacking in direction.. so we might want to throw it away and re-write it with a clearer vision.

Comments
JT
0
7/16/2009 11:27 pm
Looks really freaking cool. Approved.
Details
Ticket Status Pending  
Rating0.0 
Submitted By patspam  
Date Submitted2009-07-16 
Assigned To unassigned  
Date Assigned 2010-09-02  
Assigned By  
What to improve? WebGUI Beta  
URLrfe/request-for-enhancement/10659
Karma
Difficulty 1  
Karma So Far0
Karma Rank0.00
Keywords
Related Files
Ticket History
7/16/2009
8:19 PM
Ticket created patspam
© 2010 Plain Black Corporation | All Rights Reserved