Template:Z number doc/doc

Purpose
There are numerous templates on that should be – and in almost all cases are – substituted when used, as opposed to being transcluded; that is, when they are placed, the code is called from the existing template and placed on the page as if you had typed it there. When templates are substituted there is no longer any direct connection with the template page the text was called from other than, often, a commented out note placed by the template indicating its origin, in the form:.

Such commented out text is not searchable. For this reason it is impossible in most cases to track in any consistent and easy way the use of a template that is normally substituted. By contrast, since transcluded templates are always connected with their source template pages, all one needs to do to track usage of such templates is to check "what links here".

The z number templates, starting at and ascending (,,  etc.) are blank, never substituted templates, whose only purpose is to provide a tracking mechanism in other templates that are substituted. Each z number template is assigned to (and placed in) one specific, normally-substituted template, where usage tracking is expected to be useful. This allows the outside template to be tracked by what links to the z number template assigned to it, without changing the template or its function in any way. The small footprint z number template is simply added to the existing template's code and thereafter remains invisible in the assigned template except when viewed in "edit mode", transcluding into its assigned template no material whatsoever as it has no text or code of its own.

Creation and usage

 * 1) Create a specific z number template to be used on a one-to-one basis inside an existing template. To do so, peruse the list of assigned z number templates below, find the highest numerically assigned number in the ascending list, and create a new template at the next higher number, e.g., if z1 through z83 have already been created, you would create Template:z84. All z number templates take the same simple block of text. Copy the following text into the z number template you create, click save and you are done with creation: (yes, that's it)
 * 2) Add to the list of assigned z number templates below the z number template you have created, associating it in the list with the existing template you will be using it in for tracking purposes
 * 3) Go to the normally substituted template you wish to track and add the z number template to its syntax. We suggest placing it at the end of the template syntax, just prior to the commented out text providing the template name, e.g.,
 * 4) Be sure the z number template is not added inside of a conditional part of the template you wish to track, such as an #if function or another type of conditional parser function

List of assigned z number templates
An automatically-generated list can be found at Category:Substitution tracking templates. ( edit this list )


 * Z1 → Uw-attempt2
 * Z2 → Uw-attempt3
 * Z3 → Uw-attempt4