I’d love to use Kirby for a small project and I need a one page website which would look like this. Do you think this can be done with Kirby?
Is that description text and the images part of the table row above and can be viewed by clicking on the table row?
If every of these lines can have a description and images, you can use a subpage structure. For every row you create a subpage with the fields
description. The images are put into the folders of the subpages.
In your one-pager template, you can use something like the following code to get the data:
<table> ... <?php foreach($page->children() as $p): ?> <tr> <td><?php echo $p->title(); ?> ... <div class="description"> <?php echo $p->description()->kirbytext(); ?> <?php foreach($p->images() as $image): ?> <img src="<?php echo $image->url(); ?>" alt="<?php echo $image->title(); ?>"/> <?php endforeach; ?> </div> </tr> <?php endforach; ?> </table>
So yes, definitely possible with Kirby.
that’s awesome, thank you Lukas!
do you think there is a way to make the rows sortable by year, artists, size, etc… and dynamically change the order when clicking those labels? do this require some XML? (I’m new to coding)
this forum rocks.
You might also be interested in a plugin like this which also makes tables responsive:
There are other similar plugins out there …