Extension:PropertyTable2

Introduction
PropertyTable2 is an extension to MediaWiki that outputs a table of keys and values (titles and descriptions, or fields and contents). This extension is based on the original work of Fernando Correia PropertyTable and extends the behaviour introducing the concept of key-value pairs group.

Its purpose is to make it easier to create simple tables with a predefined style.

The version number 1.2.0 is related to the corresponding version of the original PropertyTable.

Features

 * Simple syntax.
 * Customizable style.
 * Optional auto numbering.
 * Grouping of key-value pairs.

Installation

 * 1) Download PropertyTable2.php and save it in the extensions directory of your wiki.
 * 2) Insert these lines in the LocalSettings.php file:

Customizing the visual style
It works like PropertyTable extension, thus:

There are two ways to customize the appearance of the generated table: HTML and CSS.


 * HTML: To change the HTML attributes, add these lines to LocalSettings.php, below the reference to PropertyTable2.php, and edit them according to your needs:


 * CSS: One simple way to change CSS properties in recent releases of MediaWiki is by editing the MediaWiki:Common.css page on your wiki. The default CSS classes are property_table, property_key_cell and property_value_cell.

Translating
The tag used by the extension can be translated. The default English tag is  .

To add another translation, change the section Internationalized messages in the PropertyTable.php source code file.

Please post your translation on the discussion page so other people can use it!

Basic usage

 * Within the extension tag (  by default), add a line of text for each line you want on the table.
 * Separate the key from the value using an "=" sign.
 * You can use wiki markup in the keys and in the values.

For instance,

Meeting information
Id=01/2007 Title=First monthly meeting Place=Chicago Date=Jan 10, 2007 Time=9am to 11am

Produces:



Grouping key-value pairs
You can group key-value pairs under same title using the reserved key name @title. The following tag:

@title=Qualità Abilità=12 Coraggio=7 Classe=15 @title=Dati Fisici Resistenza=10 Velocità=0,25 En. Vitale=40 Costituzione=30 @title=Combattimento Attacco=12 Parata=0 @title=Armamento Impatto=1D6+3 Protezione=0

Produces:



Automatic numbering
You can also produce formatted tables with automatic numbering, using the "#" character. For example:


 * 1) =first line
 * 2) =second line
 * 3) =third line

Produces:



Automatic sequence with letters
Alternative, you can use the "@" character to have automatic increments using letters. For example:

@=alfa @=beta @=gamma @=delta

Produces:



Using in templates
If you want to create property tables inside templates using parameters, you'll need to use the parser function form of the PropertyTable extension.

For instance, create a Template:Test page like this:

Then use it in another page, like this:

The result will be:



Alternatives

 * Standard Tables
 * TableEdit
 * PropertyTable

Feedback
Use the discussion page for feedback, questions, feature requests and bug reports.