Module:Infobox/doc

From The Big Cartoon Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Infobox

A meta-template script for creating new infobox templates. All infoboxes on this wiki are generated via a Lua script to make them easier to develop.

Usage

Create a new page at Template:Infobox_xxx where xxx is the type of your new template. #invoke this script and pass the name of your rows as parameters like follows:

{{#invoke:Infobox|infobox
| label1 = Name as it will appear in the infobox
| data1 = Template parameter name assigned to this label
| section2 = Name of a new section
| label3 = Continue adding new labels...
| data3 = ...adding one for each row
}}

The template generated by this script can be called like any normal template. In addition to user-defined rows, every infobox also has some pre-defined parameters:

  1. The first, unnamed parameter is the name of the page as it appears on Wikipedia. The default is [[Wikipedia:{{PAGENAME}}|Wikipedia]].
  2. title is an optional parameter that defines the name of the infobox. Otherwise, it will default to {{PAGENAME}}.
  3. image and imagewidth define the infobox's file and the width in pixels. If left unspecified, the image will fill the width of the box.
  4. start and end is the original run of the show/comic/etc. If either is left undefined they will default to unknown and present.

See the documentation of the individual infobox templates for examples of how these are used.