Advertisement

Abblink

Template documentation (for the template shown above, sometimes hidden or invisible)

Template to automatically create linked headers for {{Infobox}}. Takes parameters "link" and "name" as well as up to 5 game abbreviations and creates a line with links to the respective page for each, seperated by "/". The last entry has "name" (or nothing if "name" has not been given) appended.

Auxiliary template for Template:Infobox.

Usage

{{abblink|link=link target|name=link name|abbreviation 1|abbreviation 2}}
  • Up to 5 abbreviations can be given.
  • "link" and "name" should be parts of an overview page's title. For examples see below.

Parameters

Please note that if you do not specify any of the parameters, the template will return an empty string.

<unnamed 1> - <unnamed 5> (optional)

Game abbreviations; see {{abb}} for valid inputs. The abbreviations are "translated" into full game names. See below for detailed behaviour in combination with the other parameters.

link (optional)

This is the second part of the link target (the first being the game name if given). For example, if you want the template to return links which point to the pages "Fallout weapons", "Fallout 2 weapons", "Fallout 3 weapons" and so forth, this would need to be "weapons". See below for detailed behaviour in combination with the other parameters.

name (optional)

This is the second part of the link name (the first being the game name if given), i.e. the string that is shown when looking at a page.For example, if you would like the displayed string to be "Fallout weapon", "Fallout 2 weapon", "Fallout 3 weapon" and so forth, this would need to be "weapon". See below for detailed behaviour in combination with the other parameters.

abbmode (optional)

This is passed down directly to {{abb}}. Only valid input for that template's mode parameter will have any effect. The mode is only applied to the displayed string, and not to the link target.

sep (optional)

This is the character/string with which the "sections" are separated if you use more than one unnamed parameter. Defaults to / if not specified. Note that spaces at the beginning or end of the string need to be HTML encoded (& #032; without the space in between), and that you need to use {{!}} if you want to produce a |.

Behaviour in detail

  • First letter of the result's displayed part will always be uppercase.
  • Setting the first unnamed parameter to "none" results in only the translated version of "none" + "name" (if given) being shown without link.
  • For readability, the table below assumes that sep has not been specified and the default character / is being used.
Parameters given Result
link name unnamed (game) single unnamed multiple unnamed
Icon yes.png Icon yes.png Icon yes.png [[game link|''game'' name]] [[game link|''game'']]/[[game link|''game'']]/[[game link|''game'' name]]
Icon yes.png Icon yes.png Icon no.png [[link|name]] [[link|name]]
Icon yes.png Icon no.png Icon yes.png [[game link|''game'' link]] [[game link|''game'']]/[[game link|''game'']]/[[game link|''game'']]
Icon yes.png Icon no.png Icon no.png [[link|link]] [[link|link]]
Icon no.png Icon yes.png Icon yes.png ''game'' name ''game''/''game''/''game'' name
Icon no.png Icon yes.png Icon no.png name name/name/name
Icon no.png Icon no.png Icon yes.png ''game'' ''game''/''game''/''game''
Icon no.png Icon no.png Icon no.png (nothing/empty) (nothing/empty)

Examples

{{abblink|link=weapons|name=weapon|FO3}}

results in: Fallout 3 weapon

{{abblink|link=weapons|FO3}}

results in: Fallout 3

{{abblink|name=weapon|FO3}}

results in: Fallout 3 weapon

{{abblink|link=weapons|name=weapon|none}}

results in: Mentioned-only weapon

{{abblink|link=weapons|name=weapon|abbmode=short|FOBOS}}

results in: Fallout: BoS weapon

{{abblink|link=weapons|name=weapon|sep=, |FO1|FO3}}

results in: Fallout, Fallout 3 weapon

Documentation transcluded from Sablon:Abblink/doc.
Community content is available under CC-BY-SA unless otherwise noted.