Template:SpiritTableName: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
(I saw a new button and I must press it. Hopefully nothing breaks)
m (Seems templatedata is no more. Not sure when that happened, but this is literally the only place I could find it being used so not much was lost)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{anchor|{{{anchor|{{{1}}}}}}}}[[File:SSBU spirit {{#replace:{{{1}}}|:|}}.png|center|{{{size|108}}}x{{{size|108}}}px]]
<onlyinclude>{{#if:{{{dlcalt|}}}|rowspan=2{{!}}}}{{anchor|{{{anchor|{{{1}}}}}}}}{{#if:{{{hideimage|}}}||[[File:SSBU spirit {{#replace:{{#replace:{{#replace:{{{1}}}|]|}}|[|}}|:|}}.{{{ext|png}}}|center|{{{size|108}}}x{{{size|108}}}px]]}}
|{{{customname|{{#if: {{{link|}}} |[[{{{iw|}}}:{{{1}}}|{{{1}}}]]|{{{1}}}}}}}}</onlyinclude><noinclude>
|{{#if:{{{dlcalt|}}}|rowspan=2{{!}}}}{{{customname|{{#if: {{{link|}}}{{{iw|}}} |[[{{{iw|}}}:{{{1}}}|{{{1}}}]]|{{{1}}}}}}}}</onlyinclude><noinclude>


This template is capable of replacing the second and third columns of the spirit table for all tables except those for fighter spirits. The main parameter is unnamed, and will set up the default anchor, image file, and name listed in the next cell. All other parameters are named but optional.
This template is capable of replacing the second and third columns of the spirit table for all tables except those for fighter spirits. The main parameter is unnamed, and will set up the default anchor, image file, and name listed in the next cell. All other parameters are named but optional.
Line 8: Line 8:
The parameter <code>{{{anchor}}}</code> overrides the default anchor with a custom one. This is primarily used in cases where the spirit name has a parenthesis to distinguish between multiple spirits which would otherwise have the same name (Example: Slime (Dragon Quest) vs Slime (Minecraft)), but within a page only one of which is used.
The parameter <code>{{{anchor}}}</code> overrides the default anchor with a custom one. This is primarily used in cases where the spirit name has a parenthesis to distinguish between multiple spirits which would otherwise have the same name (Example: Slime (Dragon Quest) vs Slime (Minecraft)), but within a page only one of which is used.


By default, there will not be any links in the cell with the name. If <code>link</code> is not blank, then the name will be linked to its respective page within SmashWiki. If <code>link</code> is not blank and <code>iw</code> isn't left blank, the page will be linked to the respective wiki specified within the parameter <code>iw</code>. Alternatively, the parameter <code>customname</code> could be used to replace the name cell entirely, whether it be to include a unique formatting or to link to an external page.
By default, there will not be any links in the cell with the name. If <code>link</code> is not blank, then the name will be linked to its respective page within SmashWiki. If <code>link</code> is not blank and <code>iw</code> isn't left blank, the page will be linked to the respective wiki specified within the parameter <code>iw</code>. Alternatively, the parameter <code>customname</code> could be used to replace the name cell entirely, whether it be to include a unique formatting or to link to an external page.</noinclude>
 
<templatedata>
{
"params": {
"1": {
"label": "Name",
"description": "The name of the spirit",
"example": "Mario",
"type": "string",
"required": true
},
"anchor": {
"label": "Anchor",
"description": "Option to make the anchor something other than the spirit name",
"type": "string"
},
"size": {
"label": "Size",
"description": "Size in pixels",
"type": "number",
"autovalue": "108"
},
"customname": {
"label": "Alternate link",
"description": "Used in place of the \"link\" and \"iw\" parameters where basic linking isn't possible or multiple links are required",
"example": "[[Articuno]], [[Zapdos]], & [[Moltres]]",
"type": "content"
},
"link": {
"label": "Link",
"description": "Enables a quick link. If set to \"y\" will link to a page on the Smash Wiki. If \"iw\" is specified, it will link to that NIWA wiki",
"type": "boolean"
},
"iw": {
"label": "Interwiki",
"description": "Changes what wiki the link directs to",
"type": "string"
}
},
"description": "Template to simplify adding a spirit's info to a table. Automatically adds an anchor, image, and name.",
"format": "inline"
}
</templatedata></noinclude>

Latest revision as of 16:01, June 3, 2022

[[File:SSBU spirit {{{1}}}.png|center|108x108px]] |{{{1}}}

This template is capable of replacing the second and third columns of the spirit table for all tables except those for fighter spirits. The main parameter is unnamed, and will set up the default anchor, image file, and name listed in the next cell. All other parameters are named but optional.

The parameter {{{size}}} sets the size of the image shown in pixels, and defaults to 108 if no value is inputted. This is primarily used in the tables for the spirit battle, which use 64x64px images.

The parameter {{{anchor}}} overrides the default anchor with a custom one. This is primarily used in cases where the spirit name has a parenthesis to distinguish between multiple spirits which would otherwise have the same name (Example: Slime (Dragon Quest) vs Slime (Minecraft)), but within a page only one of which is used.

By default, there will not be any links in the cell with the name. If link is not blank, then the name will be linked to its respective page within SmashWiki. If link is not blank and iw isn't left blank, the page will be linked to the respective wiki specified within the parameter iw. Alternatively, the parameter customname could be used to replace the name cell entirely, whether it be to include a unique formatting or to link to an external page.