A helper template that renders external links and stores their semantics in a subobject.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| URL | URL | A valid URL of the resource we want to link to. | URL | required |
| Link text | Link text | A visible text that masks the URL | String | optional |
| Link group | Link group | Allows for retrieval and grouping of links based on their similarity. | String | optional |
Example
{{Link
|URL=
|Link text=
|Link group=
}}
It works best as a part of the Infobox system. Each infobox can have different groups of links (Store links, Download links, etc.). As a workaround that allows for re-using of the same template in forms with multiple link groups, we create aliases (redirects), e.g.:
- Template:Community link
- Template:Store link
- Template:Contact link
- Template:Download link
- Template:Event link
They all call Module:Link that:
- escalates the URL to the direct page properties
- stores all link parameters in a subobject
- renders the link
So, the URL is accessible by the direct query while the detailed data can be retrieved via a subquery, depending on your needs.
