Difference between revisions of "Template:HKD/doc"

From blackwiki
Jump to navigation Jump to search
imported>Daask
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
  
 
<nowiki>{{HKD}}</nowiki> by itself produces {{HKD}} (simple currency article link)
 
<nowiki>{{HKD}}</nowiki> by itself produces {{HKD}} (simple currency article link)
 +
 +
== Usage ==
 +
This template renders a Hong Kong currency value (HKD) with an [[ISO 4217]] identifier linked to the [[Hong Kong dollar]] article.
 +
The numeric value is be formatted via <nowiki>{{</nowiki>[[Template:Format price|Format price]]<nowiki>}}</nowiki>.
 +
 +
== Examples ==
 +
<nowiki>{{HKD|123.45}}</nowiki> produces {{HKD|123.45}} (without a space between the abbreviation and the value)
 +
 +
<nowiki>{{HKD|123.45|link=on}}</nowiki> produces {{HKD|123.45|link=on}} (with the currency symbol linked to [[Hong Kong dollar]] article)
 +
 +
<nowiki>{{HKD|1200000}}</nowiki> produces {{HKD|1200000}} (value formatted to the text qualifier)
 +
 +
<nowiki>{{HKD|1.2 million}}</nowiki> produces {{HKD|1.2 million}} (to allow for arbitrary text qualifiers as needed)
 +
 +
<nowiki>{{HKD}}</nowiki> by itself produces {{HKD}} (simple currency article link)
 +
 +
== TemplateData ==
 +
{{TemplateData header}}
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Amount",
 +
"description": "The monetary value. Preferably in numeric value.",
 +
"example": "10000.00",
 +
"type": "number"
 +
},
 +
"link": {
 +
"label": "Display currency article",
 +
"description": "To display ''Hong Kong dollar'' article. 'on' will display the link.",
 +
"example": "on",
 +
"type": "string"
 +
}
 +
},
 +
"description": "This template renders a Hong Kong currency value (HKD) with an ISO-4217 identifier linked to the ''Hong Kong dollar'' article. The value will be formatted via {{Format price}}."
 +
}
 +
</templatedata>
 +
  
 
=== See also ===
 
=== See also ===
Line 16: Line 54:
 
* [[Template:USD]]
 
* [[Template:USD]]
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
{{DEFAULTSORT:Hkd}}  
 
{{DEFAULTSORT:Hkd}}  
Line 22: Line 60:
 
[[Category:Currency templates]]
 
[[Category:Currency templates]]
 
[[Category:Unit indicator templates]]
 
[[Category:Unit indicator templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 16:55, 25 April 2020

Usage

This template renders a Hong Kong currency value (HKD) with an ISO 4217 identifier linked to the Hong Kong dollar article.

{{HKD|123.45}} produces HK$123.45

{{HKD}} by itself produces HK$ (simple currency article link)

Usage

This template renders a Hong Kong currency value (HKD) with an ISO 4217 identifier linked to the Hong Kong dollar article. The numeric value is be formatted via {{Format price}}.

Examples

{{HKD|123.45}} produces HK$123.45 (without a space between the abbreviation and the value)

{{HKD|123.45|link=on}} produces HK$123.45 (with the currency symbol linked to Hong Kong dollar article)

{{HKD|1200000}} produces HK$1.2 million (value formatted to the text qualifier)

{{HKD|1.2 million}} produces HK$1.2 million (to allow for arbitrary text qualifiers as needed)

{{HKD}} by itself produces HK$ (simple currency article link)

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 HKD

This template renders a Hong Kong currency value (HKD) with an ISO-4217 identifier linked to the ''Hong Kong dollar'' article. The value will be formatted via {{Format price}}.

Template parameters

ParameterDescriptionTypeStatus
Amount1

The monetary value. Preferably in numeric value.

Example
10000.00
Numberoptional
Display currency articlelink

To display ''Hong Kong dollar'' article. 'on' will display the link.

Example
on
Stringoptional


See also