Template:GroupLink

From OpenStreetMap Wiki
Jump to navigation Jump to search
[Edit] [Purge] Template-info.svg Template documentation

This template attempts to find a suitable article to link to, given the name of a key group. When working with English-language articles, the following article titles are considered in turn:

  • Group:Group
  • Group

If an article with one of these names exists, the group name is generated, linked to the first existing article in the list; if no articles exist with these names, the group name is generated with no linking.

When working with non-English articles, the following article titles are considered in turn:

  • Lang:Group:Group
  • Group:Group
  • Lang:Group
  • Group

In looking for articles and displaying the Group name, the first letter of that name is always folded to upper case.

The language code passed in the lang=Lang parameter is not case-significant. The effective link will be normalized by MediaWiki (uppercase only for DE|ES|FR|IT|JA|NL|RU namespaces, otherwise lowercase with an initial uppercase for all other language codes).

Usage

Examples

This wikitext: looks for the following pages: and produces:
{{GroupLink
| group = properties
| lang  = en
}}
  • Group:Properties
  • Properties
properties
{{GroupLink
| group = properties
| lang  = de
}}
  • DE:Group:Properties
  • Group:Properties
  • DE:Properties
  • Properties
properties
{{GroupLink
| group = properties
| lang  = 
}}
  • Group:Properties
  • Properties
properties
{{GroupLink
| group = properties
}}
  • Group:Properties
  • Properties
properties
{{GroupLink
| group = emergency
| lang  = en
}}
  • Group:Emergency
  • Emergency
emergency
{{GroupLink
| group = emergency
| lang  = de
}}
  • DE:Group:Emergency
  • Group:Emergency
  • DE:Emergency
  • Emergency
emergency
{{GroupLink
| group = emergency
| lang  = EN
}}
  • Group:Emergency
  • Emergency
emergency
{{GroupLink
| group = emergency
| lang  = DE
}}
  • DE:Group:Emergency
  • Group:Emergency
  • DE:Emergency
  • Emergency
emergency
{{GroupLink
| group = transport
| lang  = en
}}
  • Group:Transport
  • Transport
transport
{{GroupLink
| group = transport
| lang  = de
}}
  • DE:Group:Transport
  • Group:Transport
  • DE:Transport
  • Transport
transport
{{GroupLink
| group = buildings
| lang  = IT
}}
  • IT:Group:Buildings
  • Group:Buildings
  • IT:Buildings
  • Buildings
buildings
{{GroupLink
| group = buildings
| lang  = cs
}}
  • Cs:Group:Buildings
  • Group:Buildings
  • Cs:Buildings
  • Buildings
buildings
{{GroupLink
| group = Koleje
| lang  = pl
}}
  • Category:Pl:Koleje
  • Group:Koleje
  • Pl:Koleje
  • Koleje
Koleje

See also