Jump to content

टेम्पलेट:Z number doc

विकिपीडिया से
टेम्पलेट बिबरनलेख


There are numerous templates on Wikipedia 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: <!-- Template:Name -->.

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 {{z1}} and ascending ({{z2}}, {{z3}}, {{z4}} 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

To begin using a z number template to track a substituted template's usage, you must:

  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 then create a new template at the next higher number. For example, if z1 through z142 have already been created, you would create Template:z143. 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: <noinclude>{{Z number doc}}</noinclude> (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., {{z84}}<!-- Template:Name -->
  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
  5. Finally, if the template to which you want to add a z number template is semi- or fully-protected, make an {{Edit protected}} request on the template's talk page, requesting that the z number template you have created be added.

How to track

Once you have completed creation and assignment of a z number template to a normally substituted template, simply navigate to the z number template, click what links here, and all pages shown (but for other z number templates) are those in which the assigned template appears. If the template you are tracking is always placed in a particular namespace (for example and most likely, User talk pages), you can bypass seeing all the other Z number templates by restricting your what links here search to that namespace. That is, this user talk namespace restricted search; just fill in the template's name in the field next to Page: and click Go.

List of assigned z number templates

देखल जाय Template:Z number doc अंगरेजी विकिपीडिया पर।