Advertisement

Abbcat

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

Template for automatically adding pages to game-specific categories based on abbreviations.

Usage

{{abbcat|abbreviations|category}}

Parameters

<unnamed 1>
Game abbreviations; see {{abb}} for valid inputs. Along with unnamed 2, these abbreviations are used to add pages to categories; the category name(s) consist of unnamed 2 with the abbreviations ("translated" into full game names) appended or prepended (depending on mode). Up to 10 abbreviations can be specified if separated by comma (,).
<unnamed 2>
The "static" part of the category names and the second part of the category links (the first being game names given via unnamed 1). For example, if you want the template to add pages to "Category:Fallout characters", "Category:Fallout 2 characters", "Category:Fallout 3 characters" and so forth, this would need to be "characters". If unnamed 1 has not been specified, the page is added to a single category based on unnamed 2. For example, if unnamed 2 is set to "characters" and unnamed 1 has not been specified, the template will add the page to "Category:Characters".
(default: "prepend")
mode
Specifies display mode; in particular, how games and category name are combined to form the final categories.

Available options:

  • append: Game names are appended to the category name (e.g. "Characters Fallout 3").
  • prepend: Game names are prepended to the category name (e.g. "Fallout 3 characters").
prefix, suffix
Characters/strings which should be added before (prefix) or after (suffix) each game name. Note that spaces at the beginning or end of these strings need to be HTML encoded (& #032; without the space in between), and that you need to use {{!}} if you want to produce a |.
sort key
Sets the sort key, i.e. the term the page is displayed under on category pages.

Examples

Simple

{{abbcat|FO1, FO2, FO3|characters}}

places the page it is used on in:

Category:Fallout characters
Category:Fallout 2 characters
Category:Fallout 3 characters

Modes

{{abbcat|FO1, FO2, FO3|characters|mode=append}}

would place the page it is used on in:

Category:Characters Fallout
Category:Characters Fallout 2
Category:Characters Fallout 3

Prefix/suffix

{{abbcat|FO1, FO2, FO3|characters|mode=append|prefix=(|suffix=)}}

would place the page it is used on in:

Category:Characters (Fallout)
Category:Characters (Fallout 2)
Category:Characters (Fallout 3)
Documentation transcluded from Template:Abbcat/doc.
社区内容除另有注明外,均在CC-BY-SA许可协议下提供。