Extension:PropertyTable

Introduction
PropertyTable is an extension to MediaWiki that outputs a table of keys and values (titles and descriptions, or fields and contents).

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

Features

 * Simple syntax.
 * Customizable style.

Installation

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

// Activate PropertyTable extension include_once('extensions/PropertyTable.php');

Customizing the visual style
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 PropertyTable.php, and edit them according to your needs:

// HTML attributes of the table tag $wgPropertyTableAttributes = 'class="property_table" border="0" cellpadding="2" cellspacing="4"'; // HTML attributes of key cells $wgPropertyTableKeyAttributes = 'class="property_key_cell" valign="top" bgcolor="#E8F3FF" style="font-weight: bold"'; // HTML attributes of value cells $wgPropertyTableValueAttributes = 'class="property_value_cell" valign="top" bgcolor="#F3F3F3"';


 * 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!

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:



Alternatives

 * Standard Tables
 * TableEdit

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