Skip to content

dwarfhq/Limbo.Umbraco.Tables

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Limbo Tables GitHub license NuGet NuGet Umbraco Marketplace

Table editor for Umbraco 10+.



Installation

Install for Umbraco 10+ via NuGet. Either via the .NET CLI:

dotnet add package Limbo.Umbraco.Tables --version 1.0.3

or the NuGet Package Manager:

Install-Package Limbo.Umbraco.Tables -Version 1.0.3



Documentation

The package adds a Limbo Tables property that you can use either on a content type or on an element type (eg. in Umbraco's block list).

Properties using this property editor exposes an instance of Limbo.Umbraco.Tables.Models.TablesDataModel representing the tabular data. The property is nullable, so if the user hasn't yet entered any data, or all cells are empty, null will be returned instead.

The returned offers a number of different properties for accessing and rendering the data - eg. the Cells containing a two-dimensional array with the tabular data:

@using Limbo.Umbraco.Tables.Models
@{
    var value = block.Content.Value("data");
    if (value is TablesDataModel data)
    {
        <table>
            @foreach (IReadOnlyList<TablesDataCell> row in data.Cells)
            {
                <tr>
                    @foreach (TablesDataCell cell in row) {
                        @if (cell.Scope == "row")
                        {
                            <th>@Html.Raw(cell.Value)</th>
                        }
                        else
                        {
                            <td>@Html.Raw(cell.Value)</td>
                        }
                    }
                </tr>
            }
        </table>
    }
}



Property Editor

The property editor gives users the ability to create tabular data, with each cell value being a richtext editor on it's own.

The table can be configured to use either the first row or the first column as a header - or both.

image

About

Table editor for Umbraco 10.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 38.0%
  • C# 35.8%
  • JavaScript 10.2%
  • Less 8.0%
  • CSS 7.5%
  • Batchfile 0.5%