ထႅမ်းပလဵတ်ႉ:Formatter link
Wikidata contains many examples of "External identifiers" such as (P267) – see Anatomical Therapeutic Chemical Classification System.
These codes are used with (P1630) such as http://www.whocc.no/atc_ddd_index/?code=$1 where the $1 is to be substituted by the ATC code.
This template takes an external identifier code as |code=
and uses a formatter url as |url=
to construct a link to the external resource; an optional |label=
parameter sets the text of the link, defaulting to the value of |code=
otherwise.
Supplying the code as a parameter to this template allows one call to be made to Wikidata to fetch the code.
တူဝ်ယၢင်ႇ
မႄးထတ်း{{Formatter link |url=http://www.whocc.no/atc_ddd_index/?code=$1 |code={{wdib |P267 |qid=Q26979 |fwd=ALL |osd=n |noicon=y |maxvals=1}} }}
→
The formatter url to use for (P267) can be found from:
{{wdib |P1630 |qid=P267 |fwd=ALL |osd=n}}
→ https://www.whocc.no/atc_ddd_index/?code=$1
In infoboxes, it will generally be hard-coded because it is specific to the infobox field. Otherwise the following can be used if Wikidata changes of the formatter url should be tracked:
{{Formatter link |url={{wdib |P1630 |qid=P267 |fwd=ALL |osd=n |noicon=y}} |code={{wdib |P267 |qid=Q26979 |fwd=ALL |osd=n |noicon=y |maxvals=1}} }}
တူၺ်းပႃး
မႄးထတ်း- {{Wikidata ID}} and {{Wikidata ID line}}
- {{format link}}, a similarly-named but completely unrelated template
ၶေႃႈမုၼ်း ထႅမ်းပလဵၵ်ႉ
မႄးထတ်းCombines a Wikidata “formatter URL (P1630)” with an id code to produce a URL
Parameter | ၶေႃႈသပ်းလႅင်း | Type | Status | |
---|---|---|---|---|
code | code | the unique ID value of the target page | Unknown | required |
url | url | the Wikidata “formatter URL (P1630)” | Unknown | required |
label | label | the text of the link (defaults to the value of “code”) | Unknown | optional |
ၽိုၼ်ၵႅမ်မိုဝ်းလၢႆးၸႂ်ႉတိုဝ်း (documentation)တီႈၽၢႆႇၼိူဝ်ၼႆႉ လုၵ်ႉတီႈ ထႅမ်းပလဵတ်ႉ:Formatter link/doc သေ ၶၢႆႉသႂ်ႇၶဝ်ႈ (ႁဵတ်း transclude ဝႆႉၶႃႈဢေႃႈ။ (မႄးထတ်း | ပိုၼ်း) ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း ထႅမ်းပလဵတ်ႉဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း ထႅမ်းပလဵတ်ႉ ဢၼ်ၼႆႉ။. |