Difference between revisions of "Template:Infobox Character/adventure"
J McKalling (Talk | contribs) m |
J McKalling (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | <includeonly> | + | <includeonly>{{ |
− | {{# | + | #vardefine: lba1 | {{#ifeq: {{lc: {{#if:{{{lba1|}}}|{{{lba1}}}|no}}}} }} | no | |
− | | | + | | {{categorizer|nocat={{{nocat|false}}} |
− | + | |category=LBA1 Characters | |
− | | | + | |label=FunFrock's Reign}} }}{{ |
− | | | + | #vardefine: lba2 | {{#ifeq: {{lc: {{#if:{{{lba2|}}}|{{{lba2}}}|no}}}} }} | no | |
− | | {{categorizer|category=Characters from an unknown adventure|label=unknown|nocat={{{nocat|false}}}}} | + | | {{categorizer|nocat={{{nocat|false}}} |
+ | |category=LBA2 Characters | ||
+ | |label=Twinsen's Odyssey}} }}{{ | ||
+ | #vardefine: lba3 | {{#ifeq: {{lc: {{#if:{{{lba3|}}}|{{{lba3}}}|no}}}} }} | no | | ||
+ | | {{categorizer|nocat={{{nocat|false}}} | ||
+ | |category=LBA3 Characters | ||
+ | |label=Stellar Entity Genesis}} }}{{ | ||
+ | #vardefine: adventure |{{#var: lba1}} }}{{ | ||
+ | #vardefine: adventure |{{#var:adventure}}{{#if: {{#var: adventure}} |,<br />}}{{#var: lba2}} }}{{ | ||
+ | #vardefine: adventure |{{#var:adventure}}{{#if: {{#var: adventure}} |,<br />}}{{#var: lba3}} }}{{ | ||
+ | #switch: | ||
+ | | {{#var:lba1}}{{#var:lba2}}{{#var:lba3}} = {{categorizer|nocat={{{nocat|false}}} <!-- when all parameters are empty/undefined --> | ||
+ | |category=Characters from an unknown adventure | ||
+ | |label=unknown}} | ||
+ | | {{#var:lba1}}{{#var:lba2}} | ||
+ | | {{#var:lba1}}{{#var:lba3}} | ||
+ | | {{#var:lba2}}{{#var:lba3}} = {{#var:lba1}}{{#var:lba2}}{{#var:lba3}} <!-- when only one parameter is specified --> | ||
+ | | #default = {{categorizer|nocat={{{nocat|false}}} <!-- when multiple parameters are specified --> | ||
+ | |category=Recurring Characters | ||
+ | |label=Multiple}}: | ||
+ | </td></tr> | ||
+ | <tr><td colspan="2">{{#var:adventure}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
This template offers a multiple choice for defining which adventure a (character) article belongs to. It can also automatically categorize a page under that category. | This template offers a multiple choice for defining which adventure a (character) article belongs to. It can also automatically categorize a page under that category. | ||
==Parameters== | ==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). |
− | * | + | |
− | + | ||
− | * '''nocat''': Whether or not to suppress categorization under the chosen | + | |
− | '''''Note:''' the lba3 | + | '''''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''' are specified, the default will be 'unknown'.'' | ||
==Syntax== | ==Syntax== | ||
− | <nowiki>{{adventure|value}}</nowiki> | + | <nowiki>{{adventure|lba1=value|lba2=value|lba3=value}}</nowiki> |
==Examples== | ==Examples== | ||
− | + | Common use of the Adventure categorizer include either '''lba1''' or '''lba2''' parameters: | |
− | <nowiki>{{adventure|lba1}}</nowiki> | + | <nowiki>{{adventure|lba1=yes}}</nowiki> |
:{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}} | :{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}} | ||
− | Or this: | + | Or specify the other adventure like this: |
− | <nowiki>{{adventure|lba2}}</nowiki> | + | <nowiki>{{adventure|lba2=yes}}</nowiki> |
:{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
− | Or when | + | Or when multiple options apply (<span style="color:red">warning</span>: only works within HTML table cells!): |
− | <nowiki>{{adventure| | + | <nowiki>{{adventure|lba1=yes|lba2=yes}}</nowiki> |
− | :{{categorizer|category=Recurring Characters|label=Multiple|nocat=true}} | + | :{{categorizer|category=Recurring Characters|label=Multiple|nocat=true}}: |
+ | :{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}}, | ||
+ | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
+ | |||
+ | |||
+ | It doesn't matter what value you specify, any will do: | ||
+ | <nowiki>{{adventure|lba2=aye, let's do this!}}</nowiki> | ||
+ | |||
+ | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
+ | |||
+ | |||
+ | Notice the negative value of any of the three options is "no" (case insensitive): | ||
+ | <nowiki>{{adventure|lba2=false}}</nowiki> | ||
+ | <nowiki>{{adventure|lba2=not}}</nowiki> | ||
+ | <nowiki>{{adventure|lba2=maybe}}</nowiki> | ||
+ | |||
+ | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
+ | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
+ | :{{categorizer|category=LBA2 Characters|label=Twinsen's Odyssey|nocat=true}} | ||
When the in-game content of LBA3 is publicized, it may be specified as the adventure as well: | When the in-game content of LBA3 is publicized, it may be specified as the adventure as well: | ||
− | <nowiki>{{adventure|lba3}}</nowiki> | + | <nowiki>{{adventure|lba3=yes}}</nowiki> |
:{{categorizer|category=LBA3 Characters|label=Stellar Entity Genesis|nocat=true}} | :{{categorizer|category=LBA3 Characters|label=Stellar Entity Genesis|nocat=true}} | ||
− | + | You can also explicitly specify an adventure for exclusion (the same as leaving out the parameter or leaving it empty): | |
− | <nowiki>{{adventure| | + | <nowiki>{{adventure|lba1=yes|lba2=no}}</nowiki> |
+ | <nowiki>{{adventure|lba1=yes|lba2=}}</nowiki> | ||
− | :{{categorizer|category= | + | :{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}} |
+ | :{{categorizer|category=LBA1 Characters|label=FunFrock's Reign|nocat=true}} | ||
The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do): | The '''nocat''' parameter may be used to suppress automatic categorization like this (any value will do): | ||
− | <nowiki>{{adventure|lba1|nocat=true}}</nowiki> | + | <nowiki>{{adventure|lba1=yes|nocat=true}}</nowiki> |
(this would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 Characters]]) | (this would render the same result as the first example above, but would not automatically categorize under [[:Category:LBA1 Characters]]) | ||
[[Category:Article Categorizers]]</noinclude> | [[Category:Article Categorizers]]</noinclude> |
Revision as of 16:33, 24 November 2012
This template offers a multiple choice for defining which adventure a (character) 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 are specified, the default will be 'unknown'.
Syntax
{{adventure|lba1=value|lba2=value|lba3=value}}
Examples
Common use of the Adventure categorizer include either lba1 or lba2 parameters:
{{adventure|lba1=yes}}
- FunFrock's Reign [list all]
Or specify the other adventure like this:
{{adventure|lba2=yes}}
- Twinsen's Odyssey [list all]
Or when multiple options apply (warning: only works within HTML table cells!):
{{adventure|lba1=yes|lba2=yes}}
It doesn't matter what value you specify, any will do:
{{adventure|lba2=aye, let's do this!}}
- Twinsen's Odyssey [list all]
Notice the negative value of any of the three options is "no" (case insensitive):
{{adventure|lba2=false}} {{adventure|lba2=not}} {{adventure|lba2=maybe}}
When the in-game content of LBA3 is publicized, it may be specified as the adventure as well:
{{adventure|lba3=yes}}
- Stellar Entity Genesis [list all]
You can also explicitly specify an adventure for exclusion (the same as leaving out the parameter or leaving it empty):
{{adventure|lba1=yes|lba2=no}} {{adventure|lba1=yes|lba2=}}
The nocat parameter may be used to suppress automatic categorization like this (any value will do):
{{adventure|lba1=yes|nocat=true}}
(this would render the same result as the first example above, but would not automatically categorize under Category:LBA1 Characters)