Template:Infobox standard parameters

From the Tesseract Wiki, the wiki for all things Marvel Cinematic Universe
Jump to navigation Jump to search

This template explains the standard parameters for infoboxes based on Module:Infobox.


This template uses Module:Infobox, and as such the following standard parameters apply.

Versioning[edit source]

This template supports versioning. To make a versioned infobox, simply add version# parameters, starting at 1 and increasing until all required versioned are covered. The value of the version parameter is the name given to the version, which applies to the button/option to select the version, as well as to any SMW subobjects used.

For example, |version1=used|version2=broken.

Other parameters can (and at least some should) be versioned, and can be done by appending corresponding integers to the parameter name (e.g. |name1=Thanos|name2=Thanos (2014)).

If a version name is set to a value that results in an invalid name for a subobject, the subobject name will be modified and Category:Pages with an invalid subobject name will be added to the page.

By default, multi-version infoboxes use 1-based indexes as the switch IDs. If multiple multi-version infoboxes or Template:Switch infoboxes exist on the same page, this can cause conflicts. If needed, you can manually specify switch IDs using the switch_id# parameter (e.g. |switch_id1=alt1|switch_id2=alt2). For more info, see Template:Switch infobox § Specifying switch IDs.

smwname[edit source]

This sets the Semantic MediaWiki subobject(s) that the infobox (or current infobox version) should set the parameters into. This is only required when the infobox version name is not the intended destination of semantic properties, or if an unversioned infobox needs to set properties into a specific subobject (e.g. when versioned and unversioned infoboxes (of different types, like Item and Bonuses) are used on the same page).

By default if the page has versions, properties are set into named subobjects, where the names are the version names; if the page does not have versions, the properties are set on to the page itself. Setting smwname overrides the default behaviour - the properties will be set to the specified subobjects and only the specified subobjects.

Multiple subobjects can be specified by separating the subobject names with the broken bar ¦ - the properties will be set in all of the subobjects specified.

smwname can be versioned to change where specific infobox versions set the properties.

__dump__[edit source]

If __dump__ is present with any value, rather than displaying the infobox as normal, a string version of the infobox object is dumped to the page. This is for debugging the infobox and should only be used by previewing the page; it should never be saved in a mainspace page. Setting this adds Category:Dumping infoboxes to the page.

Specifically, this applies when the infobox is converted to a string, which will always occur when the module finally returns, but may occur earlier in the code. The object is dumped using mw.dumpObject(box). Dumping will not prevent a script error occuring.