Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Image gallery with Grav

Started by Muut Archive 12 years ago · 9 replies · 3555 views
12 years ago

I am currently reviewing Grav to see if it fits my needs. Is it possible to build an image gallery with image being served from different categories? If yes, do I need I plugin for this?

12 years ago

To be honest, i've not tried this, but it should be possible by just creating folders for each category and then adding the images. Grav will automatically treat each folder as a page and you will be able to get at those images with the regular media methods. So theoretically be able to create some simple twig templates that allow you to browse those images like a gallery.

If you check out the shop skeleton, you can probably see a similar concept except that has markdown files to define the products and a single image. But the idea remains the same.

12 years ago

Is there anyone who tried to build a gallery in grav? Ideally I can create a gallery folder, and then a couple of sub-folders (home --> gallery --> 2013 --> picnic / wedding / holiday

Are there any instructions/literature about how to achieve that?

12 years ago

I don't think anyone has specifically tried it, or at least they have not told me :) But Grav can do it with not too much effort. Like I said above, you could start with the shop skeleton and go from there.

12 years ago

All right - let me get my adventurer hat and I'll give it a shot. ;)

12 years ago

Ok, after almost 2 hours of fiddling around with the shop site I can't get it to work (given that I don't have any coding skills it's not that surprising).
Maybe someday, somebody will create a template/skeleton with a showcase/gallery section/plugin - for now I keep on blogging. ;)

12 years ago

I put together a gallery at http://christopherburkett.com/ - in my case, I wrote a bash script to pull data from a CSV file and generate the hundreds of md files and directories with the proper metadata.

12 years ago

Thanks! I'm also auto-detecting image orientation and size in the bash script with ImageMagick and populating metadata from there.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1280 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4016 9 years ago
Archive · by Muut Archive, 9 years ago
1 2892 9 years ago
Archive · by Muut Archive, 9 years ago
3 1076 9 years ago