editor icon indicating copy to clipboard operation
editor copied to clipboard

Gallery block

Open moritzebeling opened this issue 4 years ago • 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.

moritzebeling avatar Feb 26 '20 12:02 moritzebeling

Such a block would also serve as a much needed example for blocks with multiple content elements.

medienbaecker avatar Feb 26 '20 15:02 medienbaecker

@moritzebeling @medienbaecker Could this be covered by the 'Child Blocks' suggestion (#27) - or do you think we need something with more specific features here?

luxlogica avatar Mar 12 '20 01:03 luxlogica

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.

moritzebeling avatar Mar 12 '20 09:03 moritzebeling

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! :)

cajames avatar Jun 17 '20 14:06 cajames

@cajames This is just what I was looking for. Thank you very much.

scheibome avatar Jun 17 '20 15:06 scheibome

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 avatar Sep 02 '20 08:09 Ventricule

@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 avatar Sep 03 '20 08:09 moritzebeling

@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 ?

Ventricule avatar Sep 03 '20 08:09 Ventricule

https://github.com/cajames/kirby-editor-gallery-block/issues/4

medienbaecker avatar Sep 03 '20 08:09 medienbaecker

@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.

Ventricule avatar Sep 03 '20 09:09 Ventricule