Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.33 KB

File metadata and controls

62 lines (43 loc) · 1.33 KB

Signify SilverStripe Factory Elemental Table Block

An elemental block to enable more control over the responsiveness of tables.

Require via composer.json

"repositories": [
    {
        "type": "vcs",
        "url": "[email protected]:signify-nz/silverstripe-factory-elemental-tables.git"
    }
],
"require": {
    "signify-nz/silverstripe-factory-elemental-tables": "^1"
}

Usage

Content editable fields

  • Title
  • Description field
  • Caption field

Settings

  • 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

Styles

You need to add CSS styles on your site to theme the table block.

Extension

There are two extension points to allow for overriding how the description and cells are rendered:

  • formatDescription on TableBlock
  • formatCells on TableItem

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 DBFields representing each (visible) cell.

Screenshots

Main content content

Edit cells content

Settings content content