Difference between revisions of "Template:Example needed span/doc"

From blackwiki
Jump to navigation Jump to search
imported>SUM1
(→‎TemplateData: Added paramOrder)
imported>SUM1
(Update to include plural)
Line 9: Line 9:
 
== Parameters ==
 
== Parameters ==
  
 +
* {{param|text}} or {{param|1}} (empty): The text that is considered to need one or more examples
 
* {{param|date}}: The date the tag was added
 
* {{param|date}}: The date the tag was added
* {{param|text}} or {{param|1}} (empty): The text that is considered to need one or more examples
+
* {{param|plural}}: The date the tag was added
  
 
== Example ==
 
== Example ==
Line 29: Line 30:
 
"description": "Use this inline template to highlight text that may need one or more examples.",
 
"description": "Use this inline template to highlight text that may need one or more examples.",
 
"params": {
 
"params": {
 +
"1": {
 +
"aliases": [
 +
"text"
 +
],
 +
"label": "Text needing examples",
 +
"description": "The text that is considered to need one or more examples",
 +
"type": "string",
 +
"required": true
 +
        },
 
"date": {
 
"date": {
 
"label": "Month and year",
 
"label": "Month and year",
Line 36: Line 46:
 
"example": "January 2013",
 
"example": "January 2013",
 
"suggested": true
 
"suggested": true
        },
+
},
"1": {
+
"plural": {
"aliases": [
+
"label": "Plural",
"text"
+
"description": "Enter 'yes' or 'y' to change 'example' to 'examples'.",
],
 
"label": "Text needing examples",
 
"description": "The text that is considered to need one or more examples",
 
 
"type": "string",
 
"type": "string",
"required": true
+
"autovalue": "y",
 +
"example": "y"
 
}
 
}
 
},
 
},
 
"paramOrder": [
 
"paramOrder": [
 
"1",
 
"1",
"date"
+
"date",
 +
        "plural"
 
]
 
]
 
}
 
}

Revision as of 20:51, 5 February 2020

Usage

This inline template is used to highlight text that may need one or more examples.

{{Example needed-span|Text needing an example|date=Month and year}}

Parameters

  • {{{text}}} or {{{1}}} (empty): The text that is considered to need one or more examples
  • {{{date}}}: The date the tag was added
  • {{{plural}}}: The date the tag was added

Example

Input:

{{Example needed-span|Lorem ipsum dolor sit amet|date=March 2026}}

Result:

Lorem ipsum dolor sit amet[example needed]

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 Example needed span

Use this inline template to highlight text that may need one or more examples.

Template parameters

ParameterDescriptionTypeStatus
Text needing examples1 text

The text that is considered to need one or more examples

Stringrequired
Month and yeardate

Month and year of tagging; e.g., 'January 2013', but not 'jan13'

Example
January 2013
Auto value
{{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}
Stringsuggested
Pluralplural

Enter 'yes' or 'y' to change 'example' to 'examples'.

Example
y
Auto value
y
Stringoptional

See also