en>Rebecca Zarzycki Created page with "<noinclude>{{Documentationpage}}</noinclude> Template for automatically adding pages to book-specific categories based on abbreviations. ==Usage== <pre>{{abbcat|abbreviations..." |
m 1 revision imported |
(No difference)
|
Latest revision as of 03:13, 21 May 2021
![]() |
This page contains usage information for [[{{#sub:Template:Abbcat/doc|0|{{#rpos:Template:Abbcat/doc|/doc}}}}]]. |
---|
Template for automatically adding pages to book-specific categories based on abbreviations.
Usage
{{abbcat|abbreviations|category}}
Parameters
{{#replace:{{#replace:{{#replace:{{#replace:<unnamed 1>|| }}| >> | up to }}| // | or }}| ++ |, }}
Book abbreviations; see {{abb}} for valid inputs. Along with
unnamed 2
, these abbrevations are used to add pages to categories; the category name(s) consist of unnamed 2
with the abbreviations ("translated" into full book names) appended or prepended (depending on mode
).
Up to 10 abbreviations can be specified if separated by comma (,
).{{#replace:{{#replace:{{#replace:{{#replace:<unnamed 2>|| }}| >> | up to }}| // | or }}| ++ |, }}
The "static" part of the category names and the second part of the category links (the first being book names given via
unnamed 1
). For example, if you want the template to add pages to "Category:Characters in Outrider", "Category:Characters in Legion of Liberty", "Category:Characters in Snowleaf" 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")
{{#replace:{{#replace:{{#replace:{{#replace:mode|| }}| >> | up to }}| // | or }}| ++ |, }}Specifies display mode; in particular, how games and category name are combined to form the final categories.
Available options:
- append: Book names are appended to the category name (e.g. "Characters Snowleaf").
- prepend: Book names are prepended to the category name (e.g. "Snowleaf Characters").
{{#replace:{{#replace:{{#replace:{{#replace:prefix, suffix|| }}| >> | up to }}| // | or }}| ++ |, }}
Characters/strings which should be added before (
prefix
) or after (suffix
) each book 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 |
.{{#replace:{{#replace:{{#replace:{{#replace:sort key|| }}| >> | up to }}| // | or }}| ++ |, }}
Sets the sort key, i.e. the term the page is displayed under on category pages.
Examples
Simple
{{abbcat|FAC, LL, SL|characters}}
places the page it is used on in:
- Category:The Facility characters
- Category:Legion of Liberty characters
- Category:Snowleaf characters
Modes
{{abbcat|FAC, LL, SL|characters|mode=append}}
would place the page it is used on in:
- Category:Characters The Facility
- Category:Characters Legion of Liberty
- Category:Characters Snowleaf
Prefix/suffix
{{abbcat|FAC, LL, SL|characters|mode=append|prefix=(|suffix=)}}
would place the page it is used on in:
- Category:Characters (The Facility)
- Category:Characters (Legion of Liberty)
- Category:Characters (Snowleaf)