Template:Formatter link/doc

Wikidata contains many examples of "External identifiers" such as – see Anatomical Therapeutic Chemical Classification System.

These codes are used with 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.

Example
For, :

The formatter url to use for can be found from: 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:

Template data
{	"params": { "code": { "description": "the unique ID value of the target page", "required": true },		"url": { "description": "the Wikidata “formatter URL (P1630)”", "required": true },		"label": { "description": "the text of the link (defaults to the value of “code”)" }	},	"description": "Combines a Wikidata “formatter URL (P1630)” with an id code to produce a URL", "format": "inline" }