Skip to content

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

License

Notifications You must be signed in to change notification settings

signify-nz/silverstripe-factory-elemental-tables

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •