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

From blackwiki
Jump to navigation Jump to search
imported>SUM1
(→‎TemplateData: Added paramOrder)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(7 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
This inline template is used to highlight text that may need one or more examples.
 
This inline template is used to highlight text that may need one or more examples.
  
:{{Tlx|Example needed-span|Text needing an example|date{{=}}Month and year}}
+
:{{Tlx|Example needed-span|''Text needing an example''|date{{=}}''Month and year''}}
  
 
== Parameters ==
 
== Parameters ==
  
* {{param|date}}: The date the tag was added
+
* {{para|text}} or {{para|1}} (or an empty parameter): the text that is considered to need one or more examples
* {{param|text}} or {{param|1}} (empty): The text that is considered to need one or more examples
+
* {{para|date}}: the date the tag was added
 +
* {{para|plural}}: enter 'y' or 'yes' to change 'example' to 'examples'.
  
 
== Example ==
 
== Example ==
Line 21: Line 22:
  
 
: {{Example needed-span|Lorem ipsum dolor sit amet|date={{Currentmonthname}} {{Currentyear}}}}
 
: {{Example needed-span|Lorem ipsum dolor sit amet|date={{Currentmonthname}} {{Currentyear}}}}
 +
 +
Input with plural setting:
 +
 +
: {{Tlx|Example needed-span|Lorem ipsum dolor sit amet|date{{=}}{{Currentmonthname}} {{Currentyear}}|plural{{=}}y}}
 +
 +
Result:
 +
 +
: {{Example needed-span|Lorem ipsum dolor sit amet|date={{Currentmonthname}} {{Currentyear}}|plural=y}}
  
 
== TemplateData ==
 
== TemplateData ==
Line 28: Line 37:
 
{
 
{
 
"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.",
 +
"format": "inline",
 
"params": {
 
"params": {
 +
"1": {
 +
"aliases": [
 +
"text"
 +
],
 +
"label": "Text needing an example",
 +
"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 55:
 
"example": "January 2013",
 
"example": "January 2013",
 
"suggested": true
 
"suggested": true
        },
+
},
"1": {
+
"plural": {
"aliases": [
+
"label": "Plural",
"text"
+
"description": "Enter 'y' or 'yes' 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"
 
]
 
]
 
}
 
}
Line 56: Line 74:
 
== See also ==
 
== See also ==
  
* [[:Template:Example needed]], detailed information as to the usage of this template
+
* [[:Template:Example needed]]
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
<!-- Categories and interwikis go here: -->
 
<!-- Categories and interwikis go here: -->
 
[[Category:Inline cleanup templates|{{PAGENAME}}]]
 
[[Category:Inline cleanup templates|{{PAGENAME}}]]
</includeonly>
+
}}</includeonly>

Latest revision as of 04:04, 25 April 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= (or an empty parameter): the text that is considered to need one or more examples
  • |date=: the date the tag was added
  • |plural=: enter 'y' or 'yes' to change 'example' to 'examples'.

Example

Input:

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

Result:

Lorem ipsum dolor sit amet[example needed]

Input with plural setting:

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

Result:

Lorem ipsum dolor sit amet[examples 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

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text needing an example1 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 'y' or 'yes' to change 'example' to 'examples'.

Example
y
Auto value
y
Stringoptional

See also