Template:TemplateData header/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>DePiep
No edit summary
Update template documentation to reflect code changes
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}<!-- Please place category links at the bottom of this page where indicated. Thank you. -->
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
The {{Template link general|plaincode=on|TemplateData header}} template inserts a brief header for the TemplateData section of template documentation, and adds the transcluding page to [[:Category:Templates using TemplateData]].
 
Inserts a brief header for the template data section. Adds the page to [[:Category:Templates using TemplateData]].


== Usage ==
== Usage ==
<pre>
<pre style="margin-left: 3em; overflow: auto; width: 33vw;">
==TemplateData== or ==Parameters== or ==Usage==
== TemplateData == or == Parameters == or == Usage ==
{{TemplateData header}}
{{TemplateData header}}
<templatedata>{
&lt;templatedata>{
...
}</templatedata>
}&lt;/templatedata>
</pre>
</pre>


Use <code><nowiki>{{TemplateData header|Template name}}</nowiki></code> to display a name for the template other than the default, which is [[Help:Magic_words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>]].
Use {{Code|<nowiki>{{TemplateData header|Template name}}</nowiki>}} to display a name for the template other than the default, which is [[wikipedia:Help:Magic words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>]].
:{|
: {|
|{{TemplateData header|Template name}}
| {{TemplateData header|Template name}}
|}
 
Use <code><nowiki>{{TemplateData header|nolink=1}}</nowiki></code> to omit the [[Help:Link#Wikilinks|wikilink]] from the word "TemplateData" in the header text, for instances where it is already linked outside this template.
:{|
|{{TemplateData header|nolink=1}}
|}
|}


Use <code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code> to omit the first sentence of the header text.
Use {{Code|<nowiki>{{TemplateData header|nolink=1}}</nowiki>}} to omit the [[wikipedia:Help:Link#Wikilinks|wikilink]] from the word "TemplateData" in the header text, for instances where it is already linked outside this template.
:{|
: {|
|{{TemplateData header|noheader=1}}
| {{TemplateData header|nolink=1}}
|}
|}


==Parameters==
== Parameters ==
{{TemplateData header}}
{{TemplateData header}}
<templatedata>{
<templatedata>{
  "description": "Inserts a brief header for the template data section. Adds the page to [[Category:Templates using TemplateData]]",
"description": "Inserts a brief header for the TemplateData section of template documentation, and adds the page to Category:Templates using TemplateData",
  "params": {
"format": "inline",
    "1": {
"paramOrder": [
      "label": "Template name",
"1",
      "description": "Used to display a name for the template other than the default, which is {{BASEPAGENAME}}.",
"nolink"
      "type": "string",
],
      "required": false
"params": {
    },
"1": {
    "nolink": {
"label": "Template name",
      "label": "No link",
"description": "Used to display a name for the template other than the default of {{BASEPAGENAME}}",
      "description": "Assigning any value to this parameter will omit cause the template to omit the wikilink from the word \"TemplateData\" in the header text, for instances where it is already linked outside this template.",
"example": "Some other template",
      "type": "string",
"type": "wiki-template-name",
      "required": false
"default": "{{BASEPAGENAME}}"
    },
},
    "noheader": {
"nolink": {
      "label": "No header",
"label": "Disable link",
      "description": "Assigning any value to this parameter will cause the template to omit the first sentence of the header text.",
"description": "Omits the wikilink from the word 'TemplateData' in the header text when assigned any value; for instances where it is already linked outside this template.",
      "type": "string",
"example": "on",
      "required": false
"type": "line",
    }
"suggestedvalues": [
  }
"true",
"on",
"yes",
"y",
"1"
]
}
}
}</templatedata>
}</templatedata>


==See also==
== See also ==
* {{clc|Category:Templates using TemplateData}}
* {{Template link general|Crude TemplateData}}
* {{clc|Category:Pages using TemplateData header with unknown parameters}} -- Tracking
* {{Category link with count|Category:Templates using TemplateData}}
* {{tl|Crude TemplateData}}
 
<includeonly>{{sandbox other||
<includeonly>{{Sandbox other||<!-- Please place category links below this line. Thank you. -->
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:TemplateData|header]]


[[Category:TemplateData|Header template]]
}}</includeonly>
}}</includeonly>

Latest revision as of 16:18, 25 November 2024

The {{TemplateData header}} template inserts a brief header for the TemplateData section of template documentation, and adds the transcluding page to Category:Templates using TemplateData.

Usage

== TemplateData == or == Parameters == or == Usage ==
{{TemplateData header}}
<templatedata>{
…
}</templatedata>

Use {{TemplateData header|Template name}} to display a name for the template other than the default, which is {{BASEPAGENAME}}.

This is the TemplateData for this template, used by TemplateWizard, VisualEditor and other tools.
TemplateData for Template name

Use {{TemplateData header|nolink=1}} to omit the wikilink from the word "TemplateData" in the header text, for instances where it is already linked outside this template.

This is the TemplateData for this template, used by TemplateWizard, VisualEditor and other tools.
TemplateData for TemplateData header

Parameters

This is the TemplateData for this template, used by TemplateWizard, VisualEditor and other tools.
TemplateData for TemplateData header

Inserts a brief header for the TemplateData section of template documentation, and adds the page to Category:Templates using TemplateData

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Template name1

Used to display a name for the template other than the default of {{BASEPAGENAME}}

Default
{{BASEPAGENAME}}
Example
Some other template
Templateoptional
Disable linknolink

Omits the wikilink from the word 'TemplateData' in the header text when assigned any value; for instances where it is already linked outside this template.

Suggested values
true on yes y 1
Example
on
Lineoptional

See also