Gallery block
moritzebeling opened this issue · 10 comments
It would be really nice to have a block that lets the user select multiple images that later can be rendered as a gallery or slider.
Unfortunately I don’t quite get my head around creating and extending blocks yet, so I am suggesting it here.
Such a block would also serve as a much needed example for blocks with multiple content elements.
@moritzebeling @medienbaecker Could this be covered by the 'Child Blocks' suggestion (#27) - or do you think we need something with more specific features here?
Good question. For myself I would agree that a gallery technically is a group of child blocks. That would also allow, that this kind of gallery could also feature videos and quotes for example.
But maybe for a new or not as pro panel user, when they see the list of available block types, they should know what to select when they have "gallery" or "images" in mind.
And propably it should also be possible to turn a image block into a gallery block.
Hi all, I've built my take on what a Gallery Module could look like in the Editor.
https://github.com/cajames/kirby-editor-gallery-block
I'm using it on my own site and still in active development, but you're welcome to give it a try. Hope it can help! :)
Hello !
@cajames , your plugin is super great, I already used it many times, but what about a slider ?
It would be very nice to have an other plugin for that. The idea would be to be able to select as many images you want and show them has a list you can convert to slideshow if you want. The exact same base than the gallery block, but without images per block limit.
Is that already possible with a trick ?
@Ventricule You probably could have your own snippet for rendering the gallery in the frontend. Based on the original https://github.com/cajames/kirby-editor-gallery-block/blob/master/snippets/gallery.php you could remove all the layout stuff and render the images the way you need it for your specific case.
(Could be confusing, because the frontend result wouldn’t look like the preview in the panel. In general, I think backend content editing should be raw and not impose aesthetics, thats the job of the theme. But on the other hand it is sugar for editors ;) )
@moritzebeling, it's actually the way i'm doing, but I would like to change the autoLayout default value to false to not have new blocks created each time i'm adding more than 3 images. Don't know if there is a way to do that without changing the plugin code ?
@medienbaecker oh great, I haven't seen this topic before, that's exactly what I need. I'm definitly waiting for autoLayout as a global option.