Extension:Capiunto/Infobox/Basic usage

Capiunto is an extension allowing to write flexible Infoboxes based on Extension:Scribunto.

For Capiunto a basic knowledge of Lua is necessary. To read up on Lua, the Lua for beginners Help page or mediawiki Lua reference manual is useful.

Create an Infobox module
A lua module is needed in order to set up an Infobox with Capiunto. This way you will be able to keep for example a certain style and just pass data to the module which can be useful in various situations.

For a complete documentation see Extension:Capiunto/Infobox.

Setting options for capiunto.create
You have different options of styling your Infobox and setting the basic information in this step. You can get overview over all ove them here The attributes are based on wp:en:Help:Cascading_Style_Sheets CSS therefore it allows easy changing styles of every element of the Infobox.

Setting a title for an Infobox is realizable by the title variable. The Lua function  could be used to set the title of the Page as the title of the Infobox.

Another example is seting the borders of a infbox's body to the size of 10 Pixel and the color red with It is possible to change most of the styling of the infoboxes this way if wanted but there are also very convenient defaults.

Adding data to the Infobox
Adding data to the Infobox is rather simple. With the help of :addRow( label, data ) it's possible to add a new Row to the Infobox with a label and data. Its also possible to add a class, which will be applied only for the data or a rowClass, which is applied for the whole row. You can read this up here

In the example below, three chemical elements and theit symbols were added to the Infobox. This data is static and can't be changed from outside the module.

To add data to the rows when the module is called the module could have arguments passed when invoked.

The same way it's possible to add images, header, subheader and similar. An overview can be found at. This makes it possible to use templates with arguments and thereby define a style, change that style and add data as needed.

Using the Infobox module
To use the Infobox modul, you have to go to the page where you want to use the module and depending on wether you have parameters, that you give the module invoke it this way;