A gallery plugin for Kirby 2 that uses Zurb Foundation.
- Place gallery.php in your site/plugins directory.
- Place site/blueprints/gallery.php in your site/blueprints directory.
If you are not already using Foundation, there are a couple additional steps:
- Place foundation.css in your asstes/css directory.
- Place the contents of assets/js in your assets/js directory.
- In your snippets/header.php include:
<?php echo css("assets/css/foundation.css") ?>
<?php echo js("assets/js/vendor/modernizr.js") ?>`
- In your snippets/footer.php include:
<?php echo js("assets/js/vendor/jquery.js") ?>
<?php echo js("assets/js/foundation.min.js") ?>
<script>
$(document).foundation();
</script>
Create a child page using the Gallery template and add images.
Show a gallery on a page using <?php echo getGallery($page, $galleryUri) ?>
Replace $galleryUri
in the example above with the URI of the gallery page.
- create a Kirby Tag so that galleries can be added with
(gallery: uri)
.