Template:PI character/doc: Difference between revisions
m 1 revision imported |
m update the sample data |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{documentation subpage}} | {{documentation subpage}} | ||
=== Description === | === Description === | ||
| Line 24: | Line 23: | ||
"label": "Nickname", | "label": "Nickname", | ||
"description": "Nicknames used by or applied to the character; can be formatted inline with commas, separate lines with <br> or as bullet list with *.", | "description": "Nicknames used by or applied to the character; can be formatted inline with commas, separate lines with <br> or as bullet list with *.", | ||
"type": "content" | "type": "content" | ||
}, | }, | ||
| Line 45: | Line 34: | ||
"description": "Age of the character.", | "description": "Age of the character.", | ||
"type": "number" | "type": "number" | ||
}, | }, | ||
"occupation": { | "occupation": { | ||
"label": "Occupation", | "label": "Occupation", | ||
"description": "The character's job or role.", | "description": "The character's job or role.", | ||
"type": "content" | "type": "content" | ||
}, | }, | ||
| Line 124: | Line 43: | ||
"label": "Image caption", | "label": "Image caption", | ||
"description": "Caption text for image; optional. If <gallery> is used in image parameter, caption will be ignored.", | "description": "Caption text for image; optional. If <gallery> is used in image parameter, caption will be ignored.", | ||
"type": "content" | "type": "content" | ||
} | } | ||
| Line 139: | Line 53: | ||
"fullname", | "fullname", | ||
"nickname", | "nickname", | ||
"gender", | "gender", | ||
"age", | "age", | ||
"occupation" | |||
"occupation | |||
] | ] | ||
} | } | ||
| Line 166: | Line 63: | ||
<pre> | <pre> | ||
{{PI character | {{PI character | ||
|image = | |||
|image = | |caption = | ||
|caption = | |fullname = | ||
|fullname = | |nickname = | ||
|nickname = | |birthday = | ||
| | |age = | ||
| | |gender = | ||
|gender = | |family = | ||
| | |parents = | ||
| | |siblings = | ||
| | |nieces = | ||
| | |nephews = | ||
| | |aunts = | ||
| | |uncles = | ||
| | |cousins = | ||
| | |grandparents | ||
| | |pets = | ||
| | |partner = | ||
| | |spouse = | ||
| | |history = | ||
| | |highschool = | ||
| | |university = | ||
| | |job = | ||
| | |haircolor = | ||
| | |eyecolor = | ||
|height = | |||
|bodyguard = | |||
}}</pre> | }}</pre> | ||
=== Usage example === | === Usage example === | ||
Bellow is an example of template's code with filled up parameters: | Bellow is an example of template's code with filled up parameters: | ||
<pre> | <pre>{{PI character | ||
{{PI character | |image = | ||
| | |caption = | ||
| | |fullname = Ben Pirrip Cobalt | ||
| | |nickname = | ||
|nickname = | |birthday = March 29, 2022 | ||
| | |age = {{age|2022|03|22|2041}} in 2041 | ||
| | |||
|gender = Male | |gender = Male | ||
| | |family = [[Cobalt family]] | ||
| | |parents = | ||
| | * [[Connor Cobalt]] | ||
| | * [[Rose Calloway]] | ||
| | |siblings = | ||
| | |nieces = * [[Maeve Moretti]] | ||
| | |nephews = | ||
| | |aunts = | ||
| | |uncles = | ||
| | |cousins = | ||
| | |grandparents = | ||
| | |pets = | ||
|partner = [[Harriet Fisher]] | |||
|spouse = | |||
|history = | |||
|highschool = [[Dalton Academy]] | |||
|university = | |||
* [[University of Pennsylvania]] | |||
* [[Manhattan Valley University]] | |||
|job = | |||
|haircolor = | |||
|eyecolor = | |||
|height = | |||
|bodyguard = Chris Novak | |||
}}</pre> | |||
See the result on the right (links are omitted). | See the result on the right (links are omitted). | ||
{{PI character | {{PI character | ||
| | |image = | ||
| | |caption = | ||
| | |fullname = Ben Pirrip Cobalt | ||
|nickname = | |nickname = | ||
| | |birthday = March 29, 2022 | ||
| | |age = {{age|2022|03|22|2041}} in 2041 | ||
|gender = Male | |gender = Male | ||
| | |family = [[Cobalt family]] | ||
| | |parents = | ||
| | * [[Connor Cobalt]] | ||
| | * [[Rose Calloway]] | ||
| | |siblings = | ||
| | |nieces = * [[Maeve Moretti]] | ||
| | |nephews = | ||
| | |aunts = | ||
| | |uncles = | ||
| | |cousins = | ||
| | |grandparents = | ||
| | |pets = | ||
|partner = [[Harriet Fisher]] | |||
|spouse = | |||
|history = | |||
|highschool = [[Dalton Academy]] | |||
|university = | |||
* [[University of Pennsylvania]] | |||
* [[Manhattan Valley University]] | |||
|job = | |||
|haircolor = | |||
|eyecolor = | |||
|height = | |||
|bodyguard = Chris Novak | |||
}} | |||
=== Notes === | === Notes === | ||
Latest revision as of 15:28, 4 October 2025
It contains usage information, categories, and other content that is not part of the original template page.
Description
This infobox template is built with the PortableInfobox (PI) extension. It should be used in articles about fictional characters.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Name | name | Name of the character which will appear as main header of the infobox; optional, by default uses page name. | Content | optional |
| Image | image | Image file which represent the character, to be used in infobox; should be just name of the file with file extension. Can support several images with the use of <gallery> tag. | File | optional |
| Image caption | caption | Caption text for image; optional. If <gallery> is used in image parameter, caption will be ignored. | Content | optional |
| Full name | fullname | Full name of the character is available. | Content | optional |
| Nickname | nickname | Nicknames used by or applied to the character; can be formatted inline with commas, separate lines with <br> or as bullet list with *. | Content | optional |
| Gender | gender | Gender of the character. | Content | optional |
| Age | age | Age of the character. | Number | optional |
| Occupation | occupation | The character's job or role. | Content | optional |
Syntax
Bellow is a boilerplate of infobox which can be copied and filled up in source editor:
{{PI character
|image =
|caption =
|fullname =
|nickname =
|birthday =
|age =
|gender =
|family =
|parents =
|siblings =
|nieces =
|nephews =
|aunts =
|uncles =
|cousins =
|grandparents
|pets =
|partner =
|spouse =
|history =
|highschool =
|university =
|job =
|haircolor =
|eyecolor =
|height =
|bodyguard =
}}
Usage example
Bellow is an example of template's code with filled up parameters:
{{PI character
|image =
|caption =
|fullname = Ben Pirrip Cobalt
|nickname =
|birthday = March 29, 2022
|age = {{age|2022|03|22|2041}} in 2041
|gender = Male
|family = [[Cobalt family]]
|parents =
* [[Connor Cobalt]]
* [[Rose Calloway]]
|siblings =
|nieces = * [[Maeve Moretti]]
|nephews =
|aunts =
|uncles =
|cousins =
|grandparents =
|pets =
|partner = [[Harriet Fisher]]
|spouse =
|history =
|highschool = [[Dalton Academy]]
|university =
* [[University of Pennsylvania]]
* [[Manhattan Valley University]]
|job =
|haircolor =
|eyecolor =
|height =
|bodyguard = Chris Novak
}}
See the result on the right (links are omitted).
Notes
These are notes provided by Miraheze Developers Wiki (they can be removed after import):
- When importing this template to another wiki, you should enable extension PortableInfobox at Special:ManageWiki/extensions#mw-section-parserhooks, and might need to make an empty or small edit in newly created template for it to start working.
- To change visual appearance of portable infobox, modify its CSS at wiki's
MediaWiki:Common.csspage or by using TemplateStyles extension. - Upon import to another wiki the title can be changed to just "character" or whatever user prefers, so use that title instead of "PI character" in the beginning of the boilerplate code.
- This documentation contains TemplateData to provide parameters in visual editor.