Created page with " <templatedata> { "params": { "URL": { "label": "URL", "description": "A valid URL of the resource we want to link to.", "type": "url", "required": true }, "Link text": { "label": "Link text", "description": "A visible text that masks the URL", "type": "string" }, "Link group": { "label": "Link group", "description": "Allows for retrieval and grouping of links based on their similarity.", "type": "string" } }, "description": "..." |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 32: | Line 32: | ||
</pre> | </pre> | ||
It | It is designed to be 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:Community link]] | ||
* [[Template:Store link]] | * [[Template:Store link]] | ||
| Line 39: | Line 39: | ||
* [[Template:Event link]] | * [[Template:Event link]] | ||
They all call [[Module:Link]] that: | They all use [[Template:Link]] to call [[Module:Link]] that: | ||
* escalates the URL to the direct page properties | * escalates the URL to the direct page properties | ||
* stores all link parameters in a subobject | * stores all link parameters in a subobject | ||
Latest revision as of 10:17, 26 March 2026
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 is designed to be 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 use Template:Link to 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.
