An elemental block to enable more control over the responsiveness of tables.
"repositories": [
{
"type": "vcs",
"url": "[email protected]:signify-nz/silverstripe-factory-elemental-tables.git"
}
],
"require": {
"signify-nz/silverstripe-factory-elemental-tables": "^1"
}
- Title
- Description field
- Caption field
- Set the Number of Columns
- Set the Number of Rows
- Provide the CSS classes for alignments and styles, e.g. "Zebra rows"
- Set the width for each column
You need to add CSS styles on your site to theme the table block.
There are two extension points to allow for overriding how the description and cells are rendered:
formatDescription
onTableBlock
formatCells
onTableItem
Both extension points pass an object by reference and expect that object
to be modified or replaced. formatDescription
is passed a DBField of
the description; formatCells
is passed an ArrayList
of DBField
s
representing each (visible) cell.