Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Transclusionless/doc: Difference between revisions

Template page
m Protected "Template:Transclusionless/doc": Initial wiki setup ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wikipedia|page name}}
{{Documentation subpage}}
{{Documentation subpage}}
{{High-use}}
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{notice|'''Do not use this on templates that must be [[Wikipedia:Substitution|substituted]].''' {{tl|Always substitute}} is for that.}}
{{notice|'''Do not use this on templates that must be substituted.''' {{tl|Always substitute}} is for that.}}
This template can be added to templates' {{tl|documentation}} pages or nested within {{tag|noinclude}} tags for templates that are used occasionally but may often have zero [[Wikipedia:Transclusion|transclusions]] or orphaned. Adding this template will prevent the template on which it is transcluded from appearing on reports of unused templates for the [[Wikipedia:WikiProject Templates/Unused Templates Task Force|Unused Templates Task Force]], like [[Wikipedia:Database reports/Unused templates/1]], which in turn will limit misguided [[WP:TFD|TfD]] nominations.
This template can be added to templates' {{tl|documentation}} pages or nested within {{tag|noinclude}} tags for templates that are used occasionally but may often have zero transclusions or orphaned. Adding this template will prevent the template on which it is transcluded from appearing on reports of unused templates for the Unused Templates Task Force, like Wikipedia:Database reports/Unused templates/1, which in turn will limit misguided TfD nominations.


Reasons why useful templates may not have any transclusions include, but are not limited to:
Reasons why useful templates may not have any transclusions include, but are not limited to:
* The template is applied to [[WP:CSD|speedy deletion candidates]], which are subsequently deleted, leaving no transclusions of a template.
* The template is applied to speedy deletion candidates, which are subsequently deleted, leaving no transclusions of a template.
* The template is [[Wikipedia:Substituted|substituted]] or otherwise applied by a [[Wikipedia:Scripts|script]] or tool like [[Wikipedia:Twinkle|Twinkle]] or the [[Wikipedia:Page Curation|page curation tools]]. (Also see below for a note about {{tl|Always substitute}}.)
* The template is substituted or otherwise applied by a script or tool like Twinkle or the page curation tools. (Also see below for a note about {{tl|Always substitute}}.)
* The template is applied to <code>File:</code> namespace pages to tag them when they are not used anywhere but they are under discussion regarding [[Wikipedia:File copyright tags|copyright-related concerns]], and are then removed when those concerns are addressed or when the file is deleted.
* The template is applied to <code>File:</code> namespace pages to tag them when they are not used anywhere but they are under discussion regarding copyright-related concerns, and are then removed when those concerns are addressed or when the file is deleted.
* The template is [[Boilerplate code|boilerplate code]] or made of page fragments that are used to build new pages.
* The template is boilerplate code or made of page fragments that are used to build new pages.
* The template is currently undergoing a [[Wikipedia:Merger|merger]] after discussion.
* The template is currently undergoing a merger after discussion.


== Usage ==
== Usage ==
Line 42: Line 42:
}
}
</templatedata>
</templatedata>
{{List of subst helper templates}}


<includeonly>{{sandbox other||
<includeonly>{{sandbox other||

Latest revision as of 06:21, 14 April 2025

This page uses Creative Commons Licensed content from Wikipedia (view authors).

This template can be added to templates' {{documentation}} pages or nested within <noinclude>...</noinclude> tags for templates that are used occasionally but may often have zero transclusions or orphaned. Adding this template will prevent the template on which it is transcluded from appearing on reports of unused templates for the Unused Templates Task Force, like Wikipedia:Database reports/Unused templates/1, which in turn will limit misguided TfD nominations.

Reasons why useful templates may not have any transclusions include, but are not limited to:

  • The template is applied to speedy deletion candidates, which are subsequently deleted, leaving no transclusions of a template.
  • The template is 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}}.)
  • The template is applied to File: namespace pages to tag them when they are not used anywhere but they are under discussion regarding copyright-related concerns, and are then removed when those concerns are addressed or when the file is deleted.
  • The template is boilerplate code or made of page fragments that are used to build new pages.
  • The template is currently undergoing a merger after discussion.

Usage

{{Transclusionless}}

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.

Template parameters

ParameterDescriptionTypeStatus
shouldshould

Replaces "may" with "should" in the notice

Booleanoptional
reasonreason

Customizes the message within the template

Suggested values
it is substituted by a tool it is substituted by a script it is used as part of a short-term Wikipedia process it is used as part of a less active Wikipedia process
Default
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
Stringoptional