Template:TagKey/doc
Inserts a linked reference to a key.
This template is powered by Module:Tag.
Usage
Simple usage
{{TagKey|landuse}}→landuse
With language code prefix
If you explicitly specify the language code in the kl (or lang) parameter, its letter case is not significant and the link with the correct language prefix for that language is generated directly to that language, using {{LangPrefix}}, even if there's still no such translation (a red link may appear in that case).
Otherwise the language to use will be determined from the current page using Module:Languages: a single existence test will be (costly) made to find a relevant page in that language, or otherwise it will default to the (unprefixed) English version of the key description page (no additional test is made to find another fallback language). No costly test occurs for linking to the English page, which is assumed to exist (a red link may appear in that case too).
Subkeys linked to parent key's page
{{TagKey|payment|subkey=coins}}→payment:coins{{TagKey|payment|subkey=coins|subkey2=denominations}}→payment:coins:denominations
Notice that both of the key links above link to the page Key:payment, which is what is defined in 1.
Subkeys linked to dedicated page for subkey
{{TagKey|payment:coins}}→payment:coins{{TagKey|payment:coins|subkey=denominations}}→payment:coins:denominations
When linking to a subkey that has its own page (like Key:payment:coins) separate from its parent key's page (like Key:payment), add the subkey to the first parameter instead.
Subkeys linked as if they can be used as keys themselves
TemplateData
Displays key without a value automatically linked to the appropriate wiki page
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Key | 1 | Main key of the tag (the part before =)
| Line | required |
| Key page language | kl | Language code of the key description page
| Line | optional |
| Subkey | subkey subkey1 | Key part described on the same page as the main key | Line | optional |
| Subkey 2 | subkey2 | Second key part described on the same page as the main key | Line | optional |
| Subkey 3 | subkey3 | Third key part described on the same page as the main key | Line | optional |
| Subkey 4 | subkey4 | Fourth key part described on the same page as the main key | Line | optional |
| Key component 2 | : | no description | Line | optional |
| Key component 2 page language | kl: | Language code of the second key part description page
| Line | optional |
| Key component 3 | :: | Third key part described on a separate page | Line | optional |
| Key component 3 page language | kl:: | Language code of the third key part description page
| Line | optional |
| Key component 4 | ::: | Fourth key part described on a separate page | Line | optional |
| Key component 4 page language | kl::: | Language code of the fourth key part description page
| Line | optional |
| Key component 5 | :::: | Fifth key part described on a separate page | Line | optional |
| Key component 5 page language | kl:::: | Language code of the fifth key part description page
| Line | optional |
| Language | lang | Language code of all the link targets
| Line | optional |
See also
- {{TagValue}} Template:TagValue - for showing only the value
- {{Tag}} Template:Tag - for showing key and value
- {{Value}} Template:Value - marked with light blue background and other font, looks similar like code
- {{Role}} Template:Role - marked with light blue background and other font, looks similar like code