vivomedia/neos-simple-table

Last activity on 9 September 2020
  • 1
  • 1
  • 1293
composer require vivomedia/neos-simple-table

Simple Html-Table NodeType for Neos CMS

2.2.2

Simple Html-Table NodeType for Neos CMS

Version
2.2.2
Type
neos-plugin
Release Date
15.09.2020 06:34:33
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
MIT 8de5663c02f7d5493e65cf955e98156bb1505670

Latest Stable Version Total Downloads License Maintainability

VIVOMEDIA Neos-Simple-Table

Simple Html-Table NodeType for Neos CMS

What it provides

Easily adding a Table-NodeType in Neos CMS.

At the moment you can provide the data as CSV string. This will be parsed and rendered as HTML-Table.

Choose if a header row and/or a highlight column needs to be rendered.

Install

Install via composer

composer require vivomedia/neos-simple-table

Usage

Just add well formated Csv with semicolon (;) as delimiter into the data-field of the inspector. Choose if your data contains any header data and if you need the first column highlighted. Also you may add a caption for your table.

Extend

Add attributes to result table

Add classes to table

prototype(VIVOMEDIA.SimpleTable:HtmlTable) {
  attributes.class {
    table = 'table'
    striped = 'table-striped'
  }
}

Add classes to head

prototype(VIVOMEDIA.SimpleTable:HtmlTableHead) {
  attributes.class {
    something = 'something-special'
  }
}

Render icons or something other special into the cell

You can add some self-defined placeholders and replace them in your custom Fusion. For example replace all {true} or {false} keywords with an icon:

prototype(VIVOMEDIA.SimpleTable:HtmlTableColumn) {

  content {

    isTrue {
      condition = ${item == '{true}'}
      renderer = Neos.Fusion:Tag) {
        tagName = 'img'
        attributes.src = Neos.Fusion:ResourceUri {
          path = 'resource://VIVOMEDIA.SitePackage/Public/icons/checked.svg'
        }
      }
    }

    isFalse {
      condition = ${item == '{false}'}
      renderer = Neos.Fusion:Tag) {
        tagName = 'img'
        attributes.src = Neos.Fusion:ResourceUri {
          path = 'resource://VIVOMEDIA.SitePackage/Public/icons/unchecked.svg'
        }
      }
    }
  }

Screenshots

Inspector Resulting table

The content of the readme is provided by Github
The same vendor provides 9 package(s).