Package: kotti_image_gallery
This is an extension to the Kotti CMS that allows you to add galleries with images to your Kotti site.It usesBootstrap Carouselfor the gallery view.Find out more about KottiCompatibilityAs of Kotti 0.7 the image type fromkotti_image_galleryhas been moved to the Kotti core.
Please use thekotti_gallerypackage, which supersedes this package with Kotti versions >= 0.7.SetupTo activate thekotti_image_galleryadd-on in your Kotti site, you need to add an entry to thekotti.configuratorssetting in your Paste Deploy config.
If you don’t have akotti.configuratorsoption, add one.
The line in your[app:main]section could then look like this:kotti.configurators = kotti_image_gallery.kotti_configureWith this, you’ll be able to add gallery and image items in your site.Image URLskotti_image_galleryprovides on-the-fly image scaling by utilizingplone.scale(thanks to Tom Lazar for the hint).Images (including arbitrary scales) can be referenced by this URL schema:/path/to/image_content_object/image[[/<image_scale>]/download]where<image_scale>can be:a predefined image scale (see below)a string of the form<max_width>x<max_height>ora URL path segment of the form<max_width>/<max_height>If the last URL path segment isdownload, the image will be served withContent-disposition:attachmentotherwise it will be served withContent-disposition:inline.Predefined image scale sizesYou may define image scale sizes in your.inifile by setting values forkotti_image_gallery.scale_<scale_name>to values of the form<max_width>x<max_height>(e.g.kotti_image_gallery.scale_thumb = 160x120with the resulting scale namethumb).thumb(160x120) andcarousel(560x420) are always defined (because they are used in the default templates), but their values can be overwritten by settingkotti_image_gallery.scale_thumband/orkotti_image_gallery.scale_carouselto different values in your .ini file.Work in progresskotti_image_galleryis considered alpha software, not suitable for use in production environments.
The current state of the project is in no way feature complete nor API stable.
If you really want to use it in your project(s), make sure to pin the exact version in your requirements.
Not doing so will likely break your project when future releases become available.DevelopmentContributions tokotti_image_galleryare highly welcome.
Just clone itsGithub repositoryand submit your contributions as pull requests.Note that all development is done on thedevelopbranch andmasteris reserved for “production-ready state”.
Therefore make sure to always base your work on the current state of thedevelopbranch.This follows the highly recommendedA successful Git branching modelpattern, which is implemented by the excellentgitflowgit extension.Testingkotti_image_galleryhas 100% test coverage.
Please make sure that you add tests for new features and that all tests pass before submitting pull requests.
Running the test suite is as easy as runningpy.testfrom the source directory.TODOcleanup HTML/CSSadd support for remote galleries (e.g. flickr photosets)add testsCHANGES0.3.1fix packaging (thanks to Marco Scheidhuber for reporting)0.3don’t duplicate code/functionality that already exists in Kotti100% test coverage0.2Image inherits from File now.Replaced repoze.bitblt based image scaling with much more powerful plone.scale based version.0.1Initial release.