Attention
TYPO3 v7 has reached its end-of-life November 30th, 2018 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.
There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.
tableStyle¶
This function is used to add properties to a table-tag. The input is wrapped by this table-tag.
Note: This property is deprecated since TYPO3 7.1! Use CSS instead.
Property
align
Data type
align /stdWrap
Description
Specifies the alignment of the table according to surrounding text.
Property
cellspacing
Data type
integer /stdWrap
Description
The number of pixels for the cellspacing.
Property
cellpadding
Data type
integer /stdWrap
Description
The number of pixels for the cellpadding.
Property
color.field
Data type
string
Description
Set to a field name from the $cObj->data-array.
Property
color.default
color.1
color.2
color...
Data type
string
Description
Set background colors for the table. One of these colors will be used depending on the value of color.field. You can set the colors using color names, hex numbers or RGB numbers.
[default],[1],[2] are user defined.
Property
params
Data type
<table>-params
Description
Additional parameters for the table tag. E.g.:
id="my-table"
This will add the id attribute with the value "my-table" to the table tag.
[tsref:->tableStyle]
Example:¶
styles.content.tableStyle {
align.field = text_align
border.field = table_border
cellspacing.field = table_cellspacing
cellpadding = 1
color.field = table_bgColor
color.default = {$styles.content.tableStyle.color}
color.1 = {$styles.content.tableStyle.color1}
color.2 = {$styles.content.tableStyle.color2}
}