sitecoresitecore8

Table Widget Needed


I have a requirement to build a table widget for sitecore 8 update 5. They should be able to choose the number of columns from 1 to 6 and then edit the content of the table in experience editor.

I know tables can be created using the rich text editor but they really want this widget.

Finally my question is being new to sitecore what would be the recommended approach in building this widget? Keeping in mind they want to be able to choose the number of columns between 1 to 6 and with as many rows as they want and edit in experience editor.


Solution

  • I have done this in the past by using a hierarchy of child items. The data source for your Table rendering may have a field for a header or styles and its children define the rows. Rows have children to define cells. You can use edit frames with insert, delete and move up/down buttons for both rows and cells. If you need to limit columns to 6 or fewer, you may need to implement a custom button rather than use the standard insert button. The cells can then have whatever fields you need or dynamic placeholders.