Tables Module Demo

Tables module is a drupal filter module that I have developed.

The filter module takes a macro in the form:

[table=tables-grid Month |Jan | Feb | Mar | Apr
East| 7 | 14 | 21| 28
West | 7 | 14 | 21| 28
North| 7 | 14 | 21| 28
South | 7 | 14 | 21| 28 ]

The "[table" defines the beginning of the table. If a next character is a "=" it will then look for a string ending in a space to use as the table class. Only letters numbers and the "-" are permitted to be part of the class string Each cell is separated by a "|" and the rows are separated by a line feed. Therefore this macro becomes:

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

Multi column cells can be created by inserting only a "{" into a cell, and it will then be merged to the cell to the left of it, or if a "^" is inserted it will merge to the cell above. Therefore:

[table=tables-grid | Month |{ |{ |{
Direction |Jan | Feb | Mar | Apr
East| 7 | 14 | 21| 28
West | 7 | & | ^| 28
North| 7 | 14 | ^| 28
South | 7 | 14 | ^| 28 ]

Becomes:

 Month{
DirectionJanFebMarApr
East7142128
West728
North71428
South71428

If the first character of the cell is a "!", then the cell will be a th cell (a header cell). This will allow you to construct even more specialized style sheets than what are included with this. To insert a literal "!" as the first character insert " !".

Included with the module is a number of predefined style sheets:

class: tables-elegant

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-professional

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-3d-effects-1

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-3d-effects-2

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-3d-effects-3

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-tables-simple

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-colorful

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-colorful-columns

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

class: tables-colorful-list

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

As of version 1.2 (uploaded on October 9, 2005) it now supports drupal themed tables this is done by setting the class to theme:

MonthJanFebMarApr
East7142128
West7142128
North7142128
South7142128

Note that the theme'd tables do not support combining columns and rows at this time.