Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Latest commit

 

History

History
52 lines (35 loc) · 1.41 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.41 KB

This plugin for Kirby 2 is no longer maintained. It is now part of the Kirby 3 core: https://getkirby.com/docs/reference/panel/fields/files

Kirby Images

The images field can be used to edit groups of images very easily by drag-and-drop. Simply take an image from the sidebar and drop it on the field. You can also reorder images inside the field, not linked to the regular order.

Installation

Put the kirby-images folder into your site/plugins folder and rename it to images.

Example

Preview

slideshow:
  label:       Slideshow
  type:        images

Template

To display an image slideshow with the selected images you can use a code like this:

<div class="slider">
<?php foreach($page->slideshow()->yaml() as $image): ?>   
  <?php if($image = $page->image($image)): ?>
    <?= $image->crop(1200,500)->html(); ?>  		    
  <?php endif ?>
<?php endforeach; ?>
</div>

Drag between multiple instances

You can even move images between multiple instances of the images field like this:

Drag

Options

Limit the number of images

As of Images 1.0.4 you can limit the number of images:

slideshow:
  label:       Slideshow
  type:        images
  limit:       4