Phial:Infobox Parts: Difference between revisions
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
This is a collection of infobox parts. You can create new infoboxes using these, by pasting them into a new template in the order you want them, and wrapping the whole thing in the <nowiki><dl></nowiki> tag directly below. | This is a collection of infobox parts. You can create new infoboxes using these, by pasting them into a new template in the order you want them, and wrapping the whole thing in the <nowiki><dl></nowiki> tag directly below. | ||
You will need to replace any instance of asterisks (*) with the name of the field you want to use the element for. Names must be unique to each element within a given infobox, and are used to fill in the infobox from the page. | You will need to replace any instance of asterisks (*) with the name of the field you want to use the element for. This name should describe the information, not be the information, e.g. 'title' instead of 'Final Fantasy V'. Names must be unique to each element within a given infobox, and are used to fill in the infobox from the page. | ||
Start with this. It should wrap the entire infobox, meaning the <nowiki></dl></nowiki> tag should go after everything else in the template, as it does here. | Start with this. It should wrap the entire infobox, meaning the <nowiki></dl></nowiki> tag should go after everything else in the template, as it does here. | ||
| Line 12: | Line 12: | ||
==== Title ==== | ==== Title ==== | ||
This is for if you want the infobox to have a title. Infoboxes generally don't need titles, unless the title is localized from Japanese translation, in which case you should use this Title part in tandem with the Name part below. | This is for if you want the infobox to have a title. Infoboxes generally don't need titles, unless the title is localized from Japanese translation, in which case you should use this Title part in tandem with the Name part below. | ||
<pre> | <pre> | ||
{{#if:{{{*|}}} | {{#if:{{{*|}}} | ||
<dt class="infobox info-title">{{{*}}}</dt> | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 27: | Line 28: | ||
<pre> | <pre> | ||
{{#if:{{{*|}}} | {{#if:{{{*|}}} | ||
<dd class="infobox info-name">{{{*}}}</dd> | |||
}} | }} | ||
</pre> | </pre> | ||
| Line 38: | Line 39: | ||
This is for any single images. If you include a second field, | This is for any single images. If you include a second field, | ||
<nowiki>*</nowiki> = the filename of the image, e.g. | <nowiki>*</nowiki> = A field that will resolve to the filename of the image, e.g. boxart | ||
<nowiki>**</nowiki> = the image | <nowiki>**</nowiki> = A field that will resolve to the caption of the image, e.g. boxartcaption | ||
<pre> | <pre> | ||
{{#if:{{{*|}}} | {{#if:{{{*|}}} | ||
[[File:{{{*}}}{{!}}frame{{!}}class=infobox info-image | |||
{{#if:{{{**|}}} | {{#if:{{{**|}}} | ||
|{{!}}{{{**}}} | |{{!}}{{{**}}} | ||
| Line 60: | Line 61: | ||
The most straightforward way to add information to an infobox. You can have any amount of these strung together, as long as all of the IDs are unique. | The most straightforward way to add information to an infobox. You can have any amount of these strung together, as long as all of the IDs are unique. | ||
<nowiki>*</nowiki> = the name of the data you're using. | <nowiki>*</nowiki> = the name of the data you're using, e.g. releasedate | ||
<nowiki>**</nowiki> = the label for that data. | <nowiki>**</nowiki> = the label for that data. e.g. Release Date | ||
<pre> | <pre> | ||
Revision as of 07:07, 17 November 2025
This is a collection of infobox parts. You can create new infoboxes using these, by pasting them into a new template in the order you want them, and wrapping the whole thing in the <dl> tag directly below.
You will need to replace any instance of asterisks (*) with the name of the field you want to use the element for. This name should describe the information, not be the information, e.g. 'title' instead of 'Final Fantasy V'. Names must be unique to each element within a given infobox, and are used to fill in the infobox from the page.
Start with this. It should wrap the entire infobox, meaning the </dl> tag should go after everything else in the template, as it does here.
<dl class="infobox info-wrapper"><templatestyles src="infobox.css"/> * Everything else goes here. * </dl>
Title
This is for if you want the infobox to have a title. Infoboxes generally don't need titles, unless the title is localized from Japanese translation, in which case you should use this Title part in tandem with the Name part below.
{{#if:{{{*|}}}
<dt class="infobox info-title">{{{*}}}</dt>
}}
- Main Title
Name
This is for alternative names, including nicknames, aliases, and any original Japanese names. You should probably pair this with a Title, especially if it's at the top of an infobox. One field can accept multiple names,
{{#if:{{{*|}}}
<dd class="infobox info-name">{{{*}}}</dd>
}}
- Alternative Name
Image
This is for any single images. If you include a second field,
* = A field that will resolve to the filename of the image, e.g. boxart
** = A field that will resolve to the caption of the image, e.g. boxartcaption
{{#if:{{{*|}}}
[[File:{{{*}}}{{!}}frame{{!}}class=infobox info-image
{{#if:{{{**|}}}
|{{!}}{{{**}}}
}}
]]
}}
Data Pairs
The most straightforward way to add information to an infobox. You can have any amount of these strung together, as long as all of the IDs are unique.
* = the name of the data you're using, e.g. releasedate
** = the label for that data. e.g. Release Date
{{#if:{{{*|}}}
|<div class="infobox info-datablock">
<dt class="infobox info-label">**</dt>
<dd class="infobox info-data">{{{*}}}</dd>
</div>
}}
- Label
- Data point
