Can I do this kind of design with Kirby?

Hi,
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?
cheers

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 title, artists, pages, size, collaboration, year and 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.

1 Like

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)

cheers

There are a lot of Javascript plugins for sorting tables out there: http://tympanus.net/codrops/2009/10/03/33-javascript-solutions-for-sorting-tables/

1 Like

this forum rocks.
thanks mate!

You might also be interested in a plugin like this which also makes tables responsive:
http://fooplugins.com/footable/demos/sorting.htm#setup

There are other similar plugins out there …

1 Like