Module:Infobox/Config
Jump to navigation
Jump to search
This page defines the parameters that many infoboxes share.
The parameters for each specific infobox are declared on subpages of this page. These pages may opt in to (or opt out of) the parameters defined here. See Category:Infobox configuration pages for a list of such pages.
Schema
ConfigBasePage
baseParams
- Defines the essential parameters that all infoboxes share.
optInParams
- Defines parameters that are common across several infoboxes. Infobox configurations receive these parameters by setting a certain "opt-in" property to a certain value as defined in
optInDefaults
below. <paramKey>
- The string used in
optInDefaults
to reference a specific opt-in parameter. param
- The name of the template parameter corresponding to the infobox field.
[label]
The label for the infobox field, i.e. the header text displayed in the left column.
Can be left blank for special fields that have no label, where the value spans the width of the infobox.
descr
- A description of the infobox field for the infobox template's documentation.
optInDefaults
- Defines properties that can be used in infobox config to opt in to some of the paramers in
optInParams
.
local CAT_BLANK_INFOBOX_NAME_PARAM = "Category:Infoboxes with blank name parameters"
local CAT_INVALID_ARGS = require("Module:Constants/category/invalidArgs")
return {
baseParams = {
{
param = "name",
descr = "<p>The name of the ${subjectType} to display in the infobox header.</p><p>To be used only when auto-generated header is inadequate, which should be quite rare. See [[Module:Infobox]] for information on how the header name is determined automatically.</p><p>This particular parameter should not be left in source unless actually used. Articles with a blank value for <code>name=</code> are added to [["..CAT_BLANK_INFOBOX_NAME_PARAM.."]]</p>"
},
{
param = "image",
descr = "Generally, [[Template:Media]] should be used here. Otherwise, enter a file name that adequately represents the ${subjectType} in all its appearances.",
},
{
param = "caption",
descr = "A caption for the image above, if not using [[Template:Media]]."
}
},
optInParams = {
["pronunciation"] = {
param = "pronunciation",
label = "Pronunciation(s)",
descr = "Official pronunciation(s) of the ${subjectType}'s name.",
},
["game"] = {
param = "game",
label = "Main appearance(s)",
descr = "<p>Comma-separated list of [[Data:Franchise|title codes]] identifying the canon games in which the ${subjectType} appears.</p><p>If the ${subjectType} appears only in non-canon titles, those titles can be listed here instead, again using their respective [[Data:Franchise|title codes]].</p>",
},
["other"] = {
param = "other",
label = "Other appearance(s)",
descr = "<p>Comma-separated list of [[Data:Franchise|title codes]] identifying all other appearances of the ${subjectType} besides the canon games.</p><p>If the ${subjectType} does not appear in any canon games, you can list the non-canon appearances under the <code>game</code> parameter and leave this field blank.</p>",
},
["strategy"] = {
param = "strategy",
descr = "A link to StrategyWiki's guide for the ${subjectType}."
},
["zu"] = {
param = "zu",
descr = "A link to Zelda Universe's walkthrough for the ${subjectType}.",
},
},
optInDefaults = {
inUniverse = {
[true] = {"pronunciation", "game", "other"},
[false] = {},
},
addStrategy = {
[true] = {"strategy", "zu"},
},
},
}