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

From blackwiki
Jump to navigation Jump to search
(fix links with leading "0"s)
(add tracking for leading zeros in stock symbols)
Line 1: Line 1:
[[Hong Kong Stock Exchange|SEHK]]:&nbsp;[https://www.hkex.com.hk/Market-Data/Securities-Prices/Equities/Equities-Quote?sym={{#expr:{{{1}}}}}&sc_lang=en {{{1}}}]<noinclude>{{Documentation}}<!-- PLEASE ADD CATEGORIES FOR THIS TEMPLATE TO THE /doc SUBPAGE, THANKS --></noinclude>
+
[[Hong Kong Stock Exchange|SEHK]]:&nbsp;[https://www.hkex.com.hk/Market-Data/Securities-Prices/Equities/Equities-Quote?sym={{{1}}}&sc_lang=en {{{1}}}]{{#ifeq:{{#expr:{{{1}}}}}|{{{1}}}||{{Hong Kong Stock Exchange/0}}}}<noinclude>{{Documentation}}<!-- PLEASE ADD CATEGORIES FOR THIS TEMPLATE TO THE /doc SUBPAGE, THANKS --></noinclude>

Revision as of 16:39, 7 November 2017

SEHK{{{1}}}Template:Hong Kong Stock Exchange/0

Template documentation[view] [edit] [history] [purge]

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.