ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

table

Summary

Inserts a table.

Usage

pdf(table, table_rows, hash( [ showLines,         number,             ]
                             [ firstRowTitle,     boolean,            ]
                             [ titleCellCMYK,     cmyk_color,         ]
                             [ titleTextCMYK,     cmyk_color,         ]
                             [ titleFontSize,     font_size,          ]
                             [ cellCMYK,          cmyk_color,         ]
                             [ textCMYK,          cmyk_color,         ]
                             [ rowGap,            row_gap,            ]
                             [ colGap,            col_gap,            ]
                             [ cellPadding,       cell_padding,       ]
                             [ width,             table_width,        ]
                             [ repeatTableHeader, repeat_table_header ] ) )

Parameters

NameTypeDescriptionRequired
showLines integer Defines the drawing style of the table. No.
firstRowTitle boolean Defines whether the first row should be displayed as a title header (or not). No.
titleCellCMYK array CMYK color of the title cell. No.
titleTextCMYK array CMYK color of the title text. No.
titleFontSize integer Font size of the title. No.
cellCMYK array CMYK color of the cells. No.
textCMYK array CMYK color of the text. No.
rowGap integer/float Space between the table rows. No.
colGap integer/float Space between the table columns. No.
cellPadding integer/float Padding around the text in each cell. No.
width integer/float Width of the table. No.
repeatTableHeader boolean Defines whether the table header should be repeated on a new page. No.

Description

This function inserts a table. The table data must defined using the "table_rows" parameter. Use the "set-block" template function to specify the rows and the cells. The rows and cells are defined the same way as rows and cells are defined in HTML. Note that nested tables are not supported.

The "showLines" parameter specifies the drawing style of the table, it must be one of the following numbers:

  • 0 - Don't draw lines at all.
  • 1 - Draw only the inner lines.
  • 2 - Draw all the lines.

The "firstRowTitle" expects an boolean value. This parameter defines whether the first row in the table, should be used for column descriptions. With the "titleCellCMYK" and "titleTextCMYK" parameters the color of the cell-background and the text of the column titles can be controlled. The title font size can be changed with the "titleFontSize" parameter.

For the rest of the cells can the background and text color be changed with the "cellCMYK" and "textCMYK".

The size of the table and the space between the columns and rows is defined with the "rowGap", "colGap", "cellPadding", and "width" parameters.

The parameter "repeatTableHeader" defines whether the title should be repeated on each new page, if the table is stretched over multiple pages.

Balazs Halasy (14/05/2004 8:00 am)

Svitlana Shatokhina (21/02/2007 11:57 am)

Balazs Halasy, Svitlana Shatokhina


Comments

  • An example?

    Can you add an example of usage? I find it unclear how to pass the table_rows parameter.