Template:Transclusionless/doc: Difference between revisions
(add templatedata) |
(No difference)
|
Revision as of 20:09, 5 August 2024
This is a documentation subpage for Template:Transclusionless. It contains usage information, categories and other content that is not part of the original Template page. |
This template is used on many pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages or in your own user subpage. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
This template can be added to templates' {{Documentation }} pages or within <noinclude>...</noinclude>
tags for templates that are used occasionally but may often have zero transclusions. Adding this template will prevent the template on which it is transcluded from appearing on reports of unused templates like Wikipedia:Database reports/Unused templates/1, which in turn will limit misguided TfD nominations.
Examples of reasons why useful templates may not have any transclusions include, but are not limited to:
- They are applied to speedy deletion candidates, which are then deleted, leaving no transclusions of the template.
- They are substituted or otherwise applied by a script or tool like Twinkle or the page curation tools. (Also see below for a note about {{Always substitute }}.)
- They are applied to File pages to tag them with copyright-related concerns, and are then removed when those concerns are addressed or when the file is deleted.
- They are "preload" or boilerplate pages or page fragments that are used to build new pages.
Usage
- {{Transclusionless}}
This template may have no transclusions, because it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason. |
Do not use this for templates that must be substituted! That is what {{Always substitute }} is for.
Parameters
|should=yes
can be used if the template should not be transcluded, i.e. an error will be shown if the template is transcluded. It will replace the "may" with "should" in "This template may have no transclusions."
|reason=
can be used to customize the message within the template. The default reason, which will be replaced by your custom text, is "it is substituted by a tool or script, it is used as part of a short-term or less active Wikipedia process, or for some other reason".
TemplateData
This template can be added to the documentation pages of templates that are used occasionally but may often have zero transclusions, hiding them from reports of unused templates.
Parameter | Description | Type | Status | |
---|---|---|---|---|
should | should | Replaces "may" with "should" in the notice | Boolean | optional |
reason | reason | Customizes the message within the template
| String | optional |
List of subst helper templates
- {{Require substitution }} – Prints an error unless substituted.
- {{Substituted or transcluded }} – if-then-else metatemplate that checks if a template is currently being substituted or transcluded
- {{Always substitute }} – For the doc of the above templates; prints a message asking for it be substituted.
- {{Never substitute }} – The reverse of {{always substitute}}. For the doc of templates which should not be substituted; prints a message asking for it not to be substituted.
- {{May be substituted }} – For the doc of templates whose substitution is optional.
- {{Substitution }} – Allows free-fill description of whether the template should be substituted and under what conditions.
- {{Ifsubst }} – Forks if substituted or not.
- {{Issubst }} – Returns "yes" if substituted.
- {{HTML comment }} – To sign substitutions with comments that contain wikitext expansions
- Module:Unsubst – Prevents substitution.
- Module:Unsubst-infobox – Prevents substitution for infoboxes, cleans up parameters.