Difference between revisions of "Template:Hong Kong Stock Exchange/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎Also see: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{lua|Module:Leading zeros}}
 +
{{shortcut|Template:SEHK|Template:Hkse|Template:HKEX|}}
 
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
  
 
=== How to use this template ===
 
=== How to use this template ===
Type the following, replacing ''XXXX'' with the company's stock symbol:
+
Type the following, replacing ''XXXX'' with the company stock symbol:
  
 
:<code><nowiki>{{SEHK|XXXX}}</nowiki></code>
 
:<code><nowiki>{{SEHK|XXXX}}</nowiki></code>
Line 9: Line 11:
 
;Example
 
;Example
 
:<code><nowiki>{{SEHK|941}}</nowiki></code>
 
:<code><nowiki>{{SEHK|941}}</nowiki></code>
:{{SEHK|941}}
+
:{{SEHK|941}}  
 +
 +
Please do note that the company stock symbol should not have leading zeros. For example, ticker <code>0001</code> should just be <code>1</code>. Even though the template is now able to remove leading zeros from the inputted value, it should be prevented.
 +
 
 +
If a blank or non-numeric value has been inputted, it will appear "Incorrect" as a warning notice (shown as above).
  
 
===Where to use this template===
 
===Where to use this template===
Line 15: Line 21:
 
:<code><nowiki>{{Infobox company</nowiki></code>
 
:<code><nowiki>{{Infobox company</nowiki></code>
 
:<code><nowiki>| company_type=[[Public company|Public]]</nowiki></code>
 
:<code><nowiki>| company_type=[[Public company|Public]]</nowiki></code>
:<code><nowiki>| traded_as={{SEHK|0941}}<br>{{NYSE|CHL}}</nowiki></code>
+
:<code><nowiki>| traded_as={{unbulleted list|{{SEHK|941}}|{{NYSE|CHL}}}}</nowiki></code>
 
:<code><nowiki>}}</nowiki></code>
 
:<code><nowiki>}}</nowiki></code>
  
In some legacy usages, this template may be found in first sentence of the article. It is encouraged to move it to an infobox, in accordance with [[Wikipedia:Ticker symbols in article leads|Ticker symbols in article leads]] and the community RFC.
+
In some legacy usages, this template may be found in the first sentence of the article. It is encouraged to move it to an infobox, in accordance with [[Wikipedia:Ticker symbols in article leads|Ticker symbols in article leads]] and the community RFC.
  
 
Because redundant links are discouraged, this template should normally only appear in one place in an article about a publicly traded company.
 
Because redundant links are discouraged, this template should normally only appear in one place in an article about a publicly traded company.
Line 25: Line 31:
 
* {{Tlx|SEHK link}} - A version of this template that only links to the security.
 
* {{Tlx|SEHK link}} - A version of this template that only links to the security.
  
<includeonly>
+
<includeonly>{{Sandbox other||
 
<!--ADD CATEGORIES BELOW THIS LINE-->
 
<!--ADD CATEGORIES BELOW THIS LINE-->
 
[[Category:Ticker symbol templates]]
 
[[Category:Ticker symbol templates]]
</includeonly>
+
}}</includeonly>

Latest revision as of 16:58, 25 April 2020

How to use this template

Type the following, replacing XXXX with the company stock symbol:

{{SEHK|XXXX}}
Example
{{SEHK|941}}
Template:SEHK

Please do note that the company stock symbol should not have leading zeros. For example, ticker 0001 should just be 1. Even though the template is now able to remove leading zeros from the inputted value, it should be prevented.

If a blank or non-numeric value has been inputted, it will appear "Incorrect" as a warning notice (shown as above).

Where to use this template

The best location for this template is in an infobox about the company, such as {{Infobox company}}, at the top of the article, if one exists. Include this template in traded_as field:

{{Infobox company
| company_type=[[Public company|Public]]
| traded_as={{unbulleted list|{{SEHK|941}}|{{NYSE|CHL}}}}
}}

In some legacy usages, this template may be found in the first sentence of the article. It is encouraged to move it to an infobox, in accordance with Ticker symbols in article leads and the community RFC.

Because redundant links are discouraged, this template should normally only appear in one place in an article about a publicly traded company.

Also see

  • {{SEHK link}} - A version of this template that only links to the security.