|
1 | 1 |  |
2 | 2 |
|
3 | | -# Kirby Table Field |
4 | | -The table field makes possible to effortlessly create and manage tables within the panel. You can easily tailor tables to their specific needs, enhancing the efficiency and management of data presentation. |
| 3 | +[](https://github.com/bogdancondorachi/kirby-table-field/releases) |
| 4 | +[](https://getkirby.com/) |
| 5 | +[](https://github.com/sponsors/bogdancondorachi) |
| 6 | + |
| 7 | +> [!NOTE] |
| 8 | +> The table field makes possible to effortlessly create and manage tables within the panel. You can easily tailor tables to their specific needs, enhancing the efficiency and management of data presentation. |
5 | 9 |
|
6 | 10 | ## Installation |
7 | 11 |
|
@@ -32,23 +36,20 @@ fields: |
32 | 36 | ``` |
33 | 37 |
|
34 | 38 | ### Field Properties: |
35 | | -| Name | Type | Default | Description | |
36 | | -|:-----------|:----------------|:--------|:---------------------------------------------------------------------| |
37 | | -| align | `string` | `-` | Set the text alignment of the table | |
38 | | -| disabled | `bool` | `-` | If `true`, the field is no longer editable and will not be saved | |
39 | | -| duplicate | `bool` | `true` | Toggles duplicating columns and rows in the table | |
40 | | -| empty | `string` | `-` | The placeholder text if no rows exists | |
41 | | -| help | `string` | `-` | Optional help text below the field | |
42 | | -| index | `int`, `bool` | `1` | Specifies the starting index. If set to `false`, it removes the index |
43 | | -column; in this case, `sortable` would be disabled as well | |
44 | | -| label | `string` | `-` | Set the label above the field | |
45 | | -| marks | `bool`, `array` | `true` | Set the allowed HTML formats. Activate/deactivate them all by passing |
46 | | -`true`/`false` | |
47 | | -| maxColumns | `int` | `8` | Set the maximum allowed columns in the table | |
48 | | -| minColumns | `int` | `2` | Set the minimum required columns in the table | |
49 | | -| sortable | `bool` | `true` | Toggles drag & drop sorting | |
50 | | -| translate | `bool` | `true` | If `false`, the field will be disabled in non-default languages and |
51 | | -cannot be translated. This is only relevant in multi-language setups. | |
| 39 | +| Name | Type | Default | Description | |
| 40 | +|:-----------|:----------------|:--------|:-----------------------------------------------------------------| |
| 41 | +| align | `string` | `-` | Set the text alignment of the table | |
| 42 | +| disabled | `bool` | `-` | If `true`, the field is no longer editable and will not be saved | |
| 43 | +| duplicate | `bool` | `true` | Toggles duplicating columns and rows in the table | |
| 44 | +| empty | `string` | `-` | The placeholder text if no rows exists | |
| 45 | +| help | `string` | `-` | Optional help text below the field | |
| 46 | +| index | `int`, `bool` | `1` | Specifies the starting index. If set to `false`, it removes the index column; in this case, `sortable` would be disabled as well | |
| 47 | +| label | `string` | `-` | Set the label above the field | |
| 48 | +| marks | `bool`, `array` | `true` | Set the allowed HTML formats. Activate/deactivate them all by passing `true`/`false` | |
| 49 | +| maxColumns | `int` | `8` | Set the maximum allowed columns in the table | |
| 50 | +| minColumns | `int` | `2` | Set the minimum required columns in the table | |
| 51 | +| sortable | `bool` | `true` | Toggles drag & drop sorting | |
| 52 | +| translate | `bool` | `true` | If `false`, the field will be disabled in non-default languages and cannot be translated. This is only relevant in multi-language setups. | |
52 | 53 |
|
53 | 54 | ### Use the field in your template: |
54 | 55 | ```php |
@@ -128,10 +129,10 @@ if (!empty($table['headers']) && !empty($table['rows'])): ?> |
128 | 129 | ``` |
129 | 130 | To overwrite this default snippet, place your custom file in `/site/snippets/blocks/table.php` |
130 | 131 |
|
131 | | -## Credits |
| 132 | +## Buy me a coffee ☕ |
132 | 133 |
|
133 | | -- [Kirby Team](https://getkirby.com) for the [table](https://github.com/getkirby/kirby/blob/main/panel/src/components/Layout/Table.vue) layout. |
134 | | -- [Rafael Giezendanner](https://github.com/ragi96) for the initial [table-field](https://github.com/ragi96/table-field) plugin. |
| 134 | +> [!NOTE] |
| 135 | +> This plugin is provided free of charge & published under the permissive MIT License. If you're using it for a commercial project or just want to help keep it alive, please consider [donating](https://github.com/sponsors/bogdancondorachi). Your support fuels future development! |
135 | 136 |
|
136 | 137 | ## License |
137 | 138 |
|
|
0 commit comments