Difference between revisions of "Template:Infobox Enemy/adventure"
J McKalling (Talk | contribs) m |
J McKalling (Talk | contribs) (indentation) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly>{{ | ||
− | #vardefine: | + | #vardefine: lba | {{#var:lba|}}{{#ifeq: {{lc:{{#if:{{{lba1|}}}|{{{lba1}}}|no}}}} | no || 1 }}}}{{ |
− | + | #vardefine: lba | {{#var:lba|}}{{#ifeq: {{lc:{{#if:{{{lba2|}}}|{{{lba2}}}|no}}}} | no || 2 }}}}{{ | |
− | + | #vardefine: lba | {{#var:lba|}}{{#ifeq: {{lc:{{#if:{{{lba3|}}}|{{{lba3}}}|no}}}} | no || 3 }}}}{{ | |
− | + | #ifexpr: {{#len:{{#var:lba|}}}} < 1 | |
− | #vardefine: | + | |{{maintenance task|nocat={{{nocat|false}}} <!-- all options are invalid --> |
− | + | |category=Enemies from an unknown adventure | |
− | + | |doclink=Infobox Enemy/adventure | |
− | + | |label=''unknown'' | |
− | #vardefine: | + | |reason=None of the '''lba1''', '''lba2''' and '''lba3''' parameters are specified}} |
− | + | |{{ | |
− | + | #ifexpr: {{#len:{{#var:lba|}}}} > 1 | |
− | + | |{{categorizer|nocat={{{nocat|false}}} <!-- multiple options are valid --> | |
− | # | + | |category=Recurring enemies |
− | + | |label=Multiple:}} | |
− | + | </td></tr> | |
− | + | <tr><td colspan="2">}}{{list|range=3|separator={{#ifexpr: {{#len:{{#var:lba|}}}} <= 1|implode}} | |
− | + | |{{#if: {{#pos:{{#var:lba|}}|1}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA1 enemies|article=FunFrock's Reign}}}} | |
− | | {{ | + | |{{#if: {{#pos:{{#var:lba|}}|2}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA2 enemies|article=Twinsen's Odyssey}}}} |
− | + | |{{#if: {{#pos:{{#var:lba|}}|3}} | {{categorizer|nocat={{{nocat|false}}}|category=LBA3 enemies|article=Stellar Entity Genesis}}}} }} | |
− | + | }}</includeonly><noinclude>{{Infobox Template | |
− | | | + | |purpose=infobox |
− | + | |singletag=no | |
− | + | |multiline=optional | |
− | + | |gamerelated=yes | |
− | + | |suppressible=recursively | |
− | + | |choice=multiple | |
− | + | |cat1=LBA1 enemies!lba1 | |
− | + | |cat2=LBA2 enemies!lba2 | |
− | + | |cat3=LBA3 enemies!lba3 | |
− | }}</includeonly><noinclude> | + | |cat4=Recurring enemies!''multiple'' |
+ | |cat5=Enemies from an unknown adventure!''unknown''!maintenance | ||
+ | |var1=lba | ||
+ | }} | ||
+ | |||
This template offers a multiple choice for defining which adventure an (enemy) article belongs to. It can also automatically categorize a page under that category. | This template offers a multiple choice for defining which adventure an (enemy) article belongs to. It can also automatically categorize a page under that category. | ||
Line 53: | Line 57: | ||
<nowiki>{{Infobox Enemy/adventure|lba2=yes}}</nowiki> | <nowiki>{{Infobox Enemy/adventure|lba2=yes}}</nowiki> | ||
− | :{{categorizer|category=LBA1 enemies| | + | :{{categorizer|category=LBA1 enemies|article=FunFrock's Reign|nocat=true}} |
− | :{{categorizer|category=LBA2 enemies| | + | :{{categorizer|category=LBA2 enemies|article=Twinsen's Odyssey|nocat=true}} |
Line 61: | Line 65: | ||
:{{categorizer|category=Recurring enemies|label=Multiple:|nocat=true}} | :{{categorizer|category=Recurring enemies|label=Multiple:|nocat=true}} | ||
− | :*{{categorizer|category=LBA1 enemies| | + | :*{{categorizer|category=LBA1 enemies|article=FunFrock's Reign|nocat=true}} |
− | :*{{categorizer|category=LBA2 enemies| | + | :*{{categorizer|category=LBA2 enemies|article=Twinsen's Odyssey|nocat=true}} |
Line 78: | Line 82: | ||
<nowiki>{{Infobox Enemy/adventure|lba1=YES}}</nowiki> | <nowiki>{{Infobox Enemy/adventure|lba1=YES}}</nowiki> | ||
− | :{{categorizer|category=LBA1 enemies| | + | :{{categorizer|category=LBA1 enemies|article=FunFrock's Reign|nocat=true}} |
Line 87: | Line 91: | ||
<nowiki>{{Infobox Enemy/adventure|lba1=yes|lba2=NO}}</nowiki> | <nowiki>{{Infobox Enemy/adventure|lba1=yes|lba2=NO}}</nowiki> | ||
− | :{{categorizer|category=LBA1 enemies| | + | :{{categorizer|category=LBA1 enemies|article=FunFrock's Reign|nocat=true}} |
Line 93: | Line 97: | ||
<nowiki>{{Infobox Enemy/adventure|lba3=yes}}</nowiki> | <nowiki>{{Infobox Enemy/adventure|lba3=yes}}</nowiki> | ||
− | :{{categorizer|category=LBA3 enemies| | + | :{{categorizer|category=LBA3 enemies|article=Stellar Entity Genesis|nocat=true}} |
Line 101: | Line 105: | ||
<nowiki>{{Infobox Enemy/adventure|lba1=|lba2=|lba3=}}</nowiki> | <nowiki>{{Infobox Enemy/adventure|lba1=|lba2=|lba3=}}</nowiki> | ||
− | :{{categorizer|category=Enemies from an unknown adventure|label=unknown|nocat=true}} | + | :{{categorizer|category=Enemies from an unknown adventure|label=''unknown''|nocat=true}} |
Line 109: | Line 113: | ||
This would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 enemies]]. This feature works both on valid values and the maintenance task mentioned above. | This would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 enemies]]. This feature works both on valid values and the maintenance task mentioned above. | ||
− | + | </noinclude> |
Latest revision as of 22:43, 10 June 2014
Infobox Enemy/adventure | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
Optional [list all] |
Protected |
No [list all] |
Game related |
Yes [list all] |
Categorization | |
Suppressible |
Recursively [list all] |
Choice |
Multiple categories [list all] |
Categories |
Multiple: [list all] |
|
|
Variables | |
Names |
One: [list all] |
|
|
Subpages |
This template offers a multiple choice for defining which adventure an (enemy) article belongs to. It can also automatically categorize a page under that category.
Parameters
- lba1: Whether or not to select the first adventure "FunFrock's Reign" (defaults to no, enable by any other nonempty value)
- lba2: Whether or not to select the second adventure "Twinsen's Odyssey" (defaults to no, enable by any other nonempty value)
- lba3: Whether or not to select the third adventure "Stellar Entity Genesis" (defaults to no, enable by any other nonempty value)
- nocat: Whether or not to suppress categorization under the chosen categories (defaults to false, which means auto categorization).
Note: the lba3 parameter is of cource a placeholder for until the highly anticipated sequel is finally released. Do not use it yet.
Note: this categorizer is multiple choice: you can specify any combination of the three options.
Note: if neither lba1, lba2 or lba3 specify a positive value, the default 'unknown' will be used.
Syntax
{{Infobox Enemy/adventure|lba1=value|lba2=value|lba3=value}}
Examples
Common use include either the lba1 or lba2 parameter to specify the one adventure an enemy is in (value "yes" is recommended):
{{Infobox Enemy/adventure|lba1=yes}} {{Infobox Enemy/adventure|lba2=yes}}
You can also specify multiple adventures for one enemy (warning: this will force a table cell to split in two, so do not do this outside table cells!):
{{Infobox Enemy/adventure|lba1=yes|lba2=yes}}
- Multiple: [list all]
It doesn't matter which value you use, any nonempty value other than "no" will express a positive value, so these all have the same result:
{{Infobox Enemy/adventure|lba1=aye, let's do this!}} {{Infobox Enemy/adventure|lba1=false}} {{Infobox Enemy/adventure|lba1=not}} {{Infobox Enemy/adventure|lba1=maybe}} {{Infobox Enemy/adventure|lba1=0}} {{Infobox Enemy/adventure|lba1=zero}} {{Infobox Enemy/adventure|lba1=null}} {{Infobox Enemy/adventure|lba1=n}} {{Infobox Enemy/adventure|lba1=whatever}} {{Infobox Enemy/adventure|lba1=yes}} {{Infobox Enemy/adventure|lba1=YES}}
The only ways to express a negative value is by leaving out the parameter, leaving it empty or specifying "no" (case insensitive), so these all have the same result:
{{Infobox Enemy/adventure|lba1=yes}} {{Infobox Enemy/adventure|lba1=yes|lba2=}} {{Infobox Enemy/adventure|lba1=yes|lba2=no}} {{Infobox Enemy/adventure|lba1=yes|lba2=NO}}
When the in-game content of Little Big Adventure 3 is publicized, it may be specified as the adventure as well:
{{Infobox Enemy/adventure|lba3=yes}}
You may leave the "adventure" undefined (which would raise the Enemies from an unknown adventure maintenance task) by not specifying any positive value for any of the options, so these all have the same result:
{{Infobox Enemy/adventure}} {{Infobox Enemy/adventure|lba1=no}} {{Infobox Enemy/adventure|lba1=|lba2=|lba3=}}
- unknown [list all]
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{Infobox Enemy/adventure|lba1=yes|nocat=true}}
This would render the same result as the first example above, but would not automatically categorize under Category:LBA1 enemies. This feature works both on valid values and the maintenance task mentioned above.