-
Notifications
You must be signed in to change notification settings - Fork 26
dokuwiki api tables
This section describes creation of tables.
These are the basic table functions with a predefined style. These are also called for basic DokuWiki rendering and therefore the function declarations need to match the class Doku_Renderer.
The function opens a table. $maxcols specifies the number of columns. Parameters $numrows and $pos are unused.
The function closes a table. Parameter $pos is unused.
The function opens a new table row.
The function closes a table row.
The function opens a new table header cell. The cell will span $colspan columns and $rowspan rows. The content in the cell will be aligned according to $align ('left', 'center' or 'right').
The function closes a table header cell.
The function opens a new table cell. The cell will span $colspan columns and $rowspan rows. The content in the cell will be aligned according to $align ('left', 'center' or 'right').
The function closes a table header cell.
The following code:
$renderer->table_open(2);
$renderer->tablerow_open(1);
$renderer->tablecell_open();
$renderer->cdata('Cell 1/1');
$renderer->tablecell_close();
$renderer->tablecell_open();
$renderer->cdata('Cell 1/2');
$renderer->tablecell_close();
$renderer->tablerow_close(1);
$renderer->tablerow_open(1);
$renderer->tablecell_open();
$renderer->cdata('Cell 2/1');
$renderer->tablecell_close();
$renderer->tablecell_open();
$renderer->cdata('Cell 2/2');
$renderer->tablecell_close();
$renderer->tablerow_close(1);
$renderer->table_close(2);
generates a tables with 2 columns and 2 rows.