WIKINDX CLASSES

TABLE

Class Call:
include_once("core/html/TABLE.php");

Description:
Collection of methods providing HTML TABLE elements returning XHTML-compliant strings.

Developers should bear in mind that content.tpl in each template encloses the main body of WIKINDX browser display in a table cell. If you wish to add more than one table within this, you should properly close and start each table row and table cell that is part of the table definition in content.tpl.

For example, your main string to be printed to the browser may be built up as follows:

	$pString = TABLE::tableStart();
	$pString .= TABLE::trStart();
	$pString .= TABLE::td("Some text printed in a table cell in table 1.");
	$pString .= TABLE::trEnd();
	$pString .= TABLE::tableEnd();
// If this is the only table in the page, there is no need to close the table elements as found in content.tpl
// However, if you have another table, you must close the content.tpl table cell and row and start another table row and cell:
	$pString .= TABLE::tdEnd() . TABLE::trEnd() . TABLE::trStart() . TABLE::tdStart();
	$pString = TABLE::tableStart();
	$pString .= TABLE::trStart();
	$pString .= TABLE::td("Some more text printed in a table cell in table 2.");
	$pString .= TABLE::trEnd();
	$pString .= TABLE::tableEnd();
// If this is the last table in the page, there is no need to close the table elements as found in content.tpl
	$template->setVar('body', $pString);

Methods:
tableEnd()
tableStart()
td()
tdEnd()
tdStart()
trStart()
trEnd()

WIKINDX home      WIKINDX usage      WIKINDX classes