Difference between revisions of "Template:Infobox Character/family"
J McKalling (Talk | contribs) m |
J McKalling (Talk | contribs) (added infobox) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly>{{ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
#switch: | #switch: | ||
− | | {{ | + | | {{{fam1|}}}{{{fam2|}}}{{{fam3|}}}{{{fam4|}}}{{{fam5|}}} = <!-- all options are invalid --> |
− | | {{ | + | | {{{fam1|}}}{{{fam2|}}}{{{fam3|}}}{{{fam4|}}} |
− | | {{ | + | | {{{fam1|}}}{{{fam2|}}}{{{fam3|}}}{{{fam5|}}} |
− | | {{ | + | | {{{fam1|}}}{{{fam2|}}}{{{fam4|}}}{{{fam5|}}} |
− | | {{ | + | | {{{fam1|}}}{{{fam3|}}}{{{fam4|}}}{{{fam5|}}} |
− | | {{ | + | | {{{fam2|}}}{{{fam3|}}}{{{fam4|}}}{{{fam5|}}} = [[{{{fam1|}}}{{{fam2|}}}{{{fam3|}}}{{{fam4|}}}{{{fam5|}}}]] <!-- only one option is valid --> |
| #default = Multiple: <!-- multiple options are valid --> | | #default = Multiple: <!-- multiple options are valid --> | ||
</td></tr> | </td></tr> | ||
− | <tr><td colspan="2"><ul> | + | <tr><td colspan="2"><ul>{{ |
− | + | #if:{{{fam1|}}}|<li>[[{{{fam1|}}}]]</li>}}{{ | |
− | + | #if:{{{fam2|}}}|<li>[[{{{fam2|}}}]]</li>}}{{ | |
− | + | #if:{{{fam3|}}}|<li>[[{{{fam3|}}}]]</li>}}{{ | |
− | + | #if:{{{fam4|}}}|<li>[[{{{fam4|}}}]]</li>}}{{ | |
− | + | #if:{{{fam5|}}}|<li>[[{{{fam5|}}}]]</li>}}</ul> | |
− | + | }}</includeonly><noinclude>{{Infobox Template | |
− | }}</includeonly><noinclude> | + | |purpose=infobox |
+ | |singletag=no | ||
+ | |multiline=optional | ||
+ | |gamerelated=yes | ||
+ | |suppressible= | ||
+ | |choice= | ||
+ | |cat1= | ||
+ | |var1= | ||
+ | }} | ||
+ | |||
This template offers a way of optionally defining up to 5 family members a (character) article is related to. If no family members are specified, nothing is displayed. | This template offers a way of optionally defining up to 5 family members a (character) article is related to. If no family members are specified, nothing is displayed. | ||
Line 32: | Line 36: | ||
− | '''''Note:''' this categorizer doesn't actually categorize the article | + | '''''Note:''' this categorizer doesn't actually categorize the article, because there has been no decision yet how to do this for family relations ([[Template talk:{{PAGENAME}}|discuss]]).'' |
+ | |||
+ | '''''Note:''' unlike [[Template:Infobox Character/requires]], this template does not check the existence of the specified articlename ([[Template talk:{{PAGENAME}}|discuss]]).'' | ||
'''''Note:''' if multiple family members are specified, they are wrapped in a list, and nothing is displayed when none are specified.'' | '''''Note:''' if multiple family members are specified, they are wrapped in a list, and nothing is displayed when none are specified.'' | ||
==Syntax== | ==Syntax== | ||
− | <nowiki>{{family|fam1=value|fam2=value|fam3=value|fam4=value|fam5=value}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=value|fam2=value|fam3=value|fam4=value|fam5=value}}</nowiki> |
==Examples== | ==Examples== | ||
Common use include any of the '''fam1''', '''fam2''', '''fam3''', '''fam4''' or '''fam5''' parameters to specify the family members a character is related to: | Common use include any of the '''fam1''', '''fam2''', '''fam3''', '''fam4''' or '''fam5''' parameters to specify the family members a character is related to: | ||
− | <nowiki>{{family|fam1=Twinsen}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=Twinsen}}</nowiki> |
− | <nowiki>{{family|fam1=Zoé}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=Zoé}}</nowiki> |
:[[Twinsen]] | :[[Twinsen]] | ||
Line 49: | Line 55: | ||
You can also specify multiple family members for one character (<span style="color:red">warning</span>: this will force a table cell to split in two, so do not do this outside table cells!): | You can also specify multiple family members for one character (<span style="color:red">warning</span>: this will force a table cell to split in two, so do not do this outside table cells!): | ||
− | <nowiki>{{family|fam1=Twinsen|fam2=Zoé}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=Twinsen|fam2=Zoé}}</nowiki> |
:Multiple: | :Multiple: | ||
Line 57: | Line 63: | ||
You may number up to ''five'' family members, and you can define the order in which they appear (gaps are omitted): | You may number up to ''five'' family members, and you can define the order in which they appear (gaps are omitted): | ||
− | <nowiki>{{family|fam4=Twinsen|fam1=Zoé}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam4=Twinsen|fam1=Zoé}}</nowiki> |
:Multiple: | :Multiple: | ||
Line 65: | Line 71: | ||
The value you specify will be rendered as an article link directly, but there are no checks made whether the articles actually exist, so this will render as a red-link: | The value you specify will be rendered as an article link directly, but there are no checks made whether the articles actually exist, so this will render as a red-link: | ||
− | <nowiki>{{family|fam1=Nonexisting character}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=Nonexisting character}}</nowiki> |
:[[Nonexisting character]] | :[[Nonexisting character]] | ||
+ | |||
+ | |||
+ | In some cases, it may be desired to specify an alternate text for the link, which you can by using the <nowiki>{{</nowiki>[[Template:!|!]]<nowiki>}}</nowiki> template like this: | ||
+ | <nowiki>{{Infobox Character/family|fam1=Zoé{{!}}Zoé (girlfriend)}}</nowiki> | ||
+ | |||
+ | :[[Zoé|Zoé (girlfriend)]] | ||
You may leave "family" undefined (which would not raise any maintenance task) by not specifying any value, so these all have the same result (nothing displayed): | You may leave "family" undefined (which would not raise any maintenance task) by not specifying any value, so these all have the same result (nothing displayed): | ||
− | <nowiki>{{family}}</nowiki> | + | <nowiki>{{Infobox Character/family}}</nowiki> |
− | <nowiki>{{family|fam1=}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=}}</nowiki> |
− | <nowiki>{{family|fam3=}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam3=}}</nowiki> |
− | <nowiki>{{family|fam1=|fam2=|fam3=|fam4=|fam5=}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1=|fam2=|fam3=|fam4=|fam5=}}</nowiki> |
− | <nowiki>{{family|fam5=|fam4=|fam3=|fam2=|fam1=}}</nowiki> | + | <nowiki>{{Infobox Character/family|fam5=|fam4=|fam3=|fam2=|fam1=}}</nowiki> |
− | <nowiki>{{family|fam1= |fam2= |fam3= |fam4= |fam5= }}</nowiki> | + | <nowiki>{{Infobox Character/family|fam1= |fam2= |fam3= |fam4= |fam5= }}</nowiki> |
− | <nowiki>{{family | + | <nowiki>{{Infobox Character/family |
|fam1= | |fam1= | ||
|fam2= | |fam2= | ||
Line 85: | Line 97: | ||
}}</nowiki> | }}</nowiki> | ||
− | + | </noinclude> |
Latest revision as of 20:58, 5 June 2014
Infobox Character/family | |
---|---|
Purpose |
Infobox [list all] |
Single tag |
No [list all] |
Multi-line |
Optional [list all] |
Protected |
No [list all] |
Game related |
Yes [list all] |
Categorization | |
Categories |
none [list all] |
Variables | |
Names |
none [list all] |
Subpages |
This template offers a way of optionally defining up to 5 family members a (character) article is related to. If no family members are specified, nothing is displayed.
Parameters
- fam1: The name of the first family member of the character (existing character article, specified by any nonempty value)
- fam2: The name of the second family member of the character (existing character article, specified by any nonempty value)
- fam3: The name of the third family member of the character (existing character article, specified by any nonempty value)
- fam4: The name of the fourth family member of the character (existing character article, specified by any nonempty value)
- fam5: The name of the fifth family member of the character (existing character article, specified by any nonempty value)
Note: this categorizer doesn't actually categorize the article, because there has been no decision yet how to do this for family relations (discuss).
Note: unlike Template:Infobox Character/requires, this template does not check the existence of the specified articlename (discuss).
Note: if multiple family members are specified, they are wrapped in a list, and nothing is displayed when none are specified.
Syntax
{{Infobox Character/family|fam1=value|fam2=value|fam3=value|fam4=value|fam5=value}}
Examples
Common use include any of the fam1, fam2, fam3, fam4 or fam5 parameters to specify the family members a character is related to:
{{Infobox Character/family|fam1=Twinsen}} {{Infobox Character/family|fam1=Zoé}}
You can also specify multiple family members for one character (warning: this will force a table cell to split in two, so do not do this outside table cells!):
{{Infobox Character/family|fam1=Twinsen|fam2=Zoé}}
You may number up to five family members, and you can define the order in which they appear (gaps are omitted):
{{Infobox Character/family|fam4=Twinsen|fam1=Zoé}}
The value you specify will be rendered as an article link directly, but there are no checks made whether the articles actually exist, so this will render as a red-link:
{{Infobox Character/family|fam1=Nonexisting character}}
In some cases, it may be desired to specify an alternate text for the link, which you can by using the {{!}} template like this:
{{Infobox Character/family|fam1=Zoé{{!}}Zoé (girlfriend)}}
You may leave "family" undefined (which would not raise any maintenance task) by not specifying any value, so these all have the same result (nothing displayed):
{{Infobox Character/family}} {{Infobox Character/family|fam1=}} {{Infobox Character/family|fam3=}} {{Infobox Character/family|fam1=|fam2=|fam3=|fam4=|fam5=}} {{Infobox Character/family|fam5=|fam4=|fam3=|fam2=|fam1=}} {{Infobox Character/family|fam1= |fam2= |fam3= |fam4= |fam5= }} {{Infobox Character/family |fam1= |fam2= |fam3= |fam4= |fam5= }}