PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

Template:Link/doc

From PC Gaming Shelter
Revision as of 10:15, 26 March 2026 by WikiVisor (talk | contribs) (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": "...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A helper template that renders external links and stores their semantics in a subobject.

Template parameters

ParameterDescriptionTypeStatus
URLURL

A valid URL of the resource we want to link to.

URLrequired
Link textLink text

A visible text that masks the URL

Stringoptional
Link groupLink group

Allows for retrieval and grouping of links based on their similarity.

Stringoptional

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.:

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.