floriankarsten / Kirby Tablex
KIRBY 2 ONLY. No plans for K3 version yet. Table field for Kirby CMS.
Stars: ✭ 70
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Kirby Tablex
Select A Structure
A select field for Kirby populated by a structure field.
Stars: ✭ 44 (-37.14%)
Mutual labels: kirby
soba
Kirby starter theme that uses Twig, PostCSS, and Browsersync
Stars: ✭ 16 (-77.14%)
Mutual labels: kirby
kirby-imageradio
Add illustrations to Kirby's radio buttons. Kirby 2 and 3.
Stars: ✭ 49 (-30%)
Mutual labels: kirby
kirby-architect
📐 Easily reference Blueprint data from anywhere in your Kirby application.
Stars: ✭ 38 (-45.71%)
Mutual labels: kirby
kirby-copy-files
Clone page dashboard widget for Kirby panel
Stars: ✭ 12 (-82.86%)
Mutual labels: kirby
Kirby Autofocus
Content aware image cropping for Kirby. Kirby 2 and 3.
Stars: ✭ 35 (-50%)
Mutual labels: kirby
kirby-blade
Enable Laravel Blade Template Engine for Kirby 3
Stars: ✭ 20 (-71.43%)
Mutual labels: kirby
kirby-locator
A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 only.
Stars: ✭ 83 (+18.57%)
Mutual labels: kirby
Kirby Sri
Subresource integrity hashing & cache-busting static assets for Kirby
Stars: ✭ 9 (-87.14%)
Mutual labels: kirby
Kirby Color Palette
A color palette to pick colors from in the panel. Kirby 3 only.
Stars: ✭ 47 (-32.86%)
Mutual labels: kirby
Bentobox
A simple theme to organize links using the Kirby CMS
Stars: ✭ 24 (-65.71%)
Mutual labels: kirby
Kirby Geolocation Field
Geolocation panel field for Kirby 2
Stars: ✭ 52 (-25.71%)
Mutual labels: kirby
Kirby Template Sitemap
DEPRECATED: Sitemap-Templates with option to exclude pages by template e.g. for one-pagers
Stars: ✭ 9 (-87.14%)
Mutual labels: kirby
Kirby 2 only. There are no plans for Kirby 3 version yet.
Kirby tablex
Kirby tablex - simple table field for Kirby CMS. Advice, features and sugestions welcome.
Usage
As any field in blueprint:
table:
label: table
type: tablex
options:
maxColumns: 10
minColumns: 3
header: false
Options are not required. Defaults are:
maxColumns: 10
minColumns: 1
header: false
Content is then structured as regular yaml arrays:
Table:
header:
- Column 1 heading
- Column 2 heading
- Column 3 heading
table:
-
- Column 1 row 1
- Column 2 row 1
- Column 3 row 1
-
- Column 2 row 1
- Will be nothing after this
- Column 3 row 2
-
- ""
- nothing
- Column 3 row 3
-
- Column 4 row 1
- Real
- Column 3 row 4
In your template you can simply use kirbys toStructure()
Example:
<?php $tableX = $page->table()->toStructure(); ?>
<div class="table">
<table>
<thead>
<tr>
<?php foreach($tableX->header() as $headerCell): ?>
<th><?= $headerCell; ?></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach($tableX->table() as $tableRow): ?>
<tr>
<?php foreach($tableRow as $tableCell): ?>
<td><?= $tableCell; ?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
Installation
To install the plugin, please put it in the site/fields
directory.
The field folder must be named tablex
.
site/fields/
tablex/
tablex.php
...
Download
Link to latest version https://github.com/floriankarsten/kirby-tablex/releases/latest
With Kirby CLI
kirby plugin:install floriankarsten/kirby-tablex
With Git
git clone https://github.com/floriankarsten/kirby-tablex/releases.git tablex
You can of course have it as submodule.
What we are not sure about - ideas, opinions welcome :)
- Naming, we chose stupid name kirby-tablex because we were worried about namespace pollution.
How to properly pass data from kirby to JS. We are rendering ui only with JS. HTML doesn't come rendered from server. All data is passed to data-attribute of root element and taken from there. We are not sure how to make this safe properly. If you start to put ' and stuff like that into Tablex things will break.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].