Difference between revisions of "Template:DYKrule/doc"

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(add cat)
imported>Vanisaac
m (→‎TemplateData: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(One intermediate revision by one other user not shown)
Line 15: Line 15:
 
|}
 
|}
  
<includeonly>
+
 
 +
==TemplateData==
 +
{{TemplateDataHeader}}
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"aliases": [
 +
"Rule",
 +
"rule"
 +
],
 +
"label": "rule",
 +
"description": "The specific rule to link to",
 +
"example": "gen1",
 +
"type": "string",
 +
"required": true
 +
}
 +
},
 +
"description": "Link to a DYK rule",
 +
"format": "inline",
 +
"paramOrder": [
 +
"1"
 +
]
 +
}
 +
</templatedata>
 +
 
 +
<includeonly>{{Sandbox other||
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:Wikipedia Did you know templates]]
 
[[Category:Wikipedia Did you know templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 00:50, 25 April 2020

Usage

This template provides an easy way to link to the rules of the Did you know project. Usage: {{DYKrule|<rule>}}. <rule> may be one of the five rules listed at WP:DYK#Selection criteria (numbered gen1 through gen5), or one of the rules listed at WP:DYKAR or WP:DYK1P. Because some of these rules have the same names, conflicts arise; in this case, the template behaves as follows:

Code Result Comment
{{DYKrule|A1a}} A1 Additional rule A1 linked
{{DYKrule|A1b}} A1 Rule A1 listed at WP:DYK1P linked
{{DYKrule|A1}} additional rule A1 or after nominating rule A1 Both rules are linked


TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for DYKrule

Link to a DYK rule

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
rule1 Rule rule

The specific rule to link to

Example
gen1
Stringrequired