Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

help starting work on simple gallery system??


Go to End


6 Posts   1781 Views

Avatar
DsX

Community Member, 178 Posts

16 September 2010 at 5:38am

I am starting to work on what will be a simple gallery system. (I want to create it myself rather than use the gallery module since I don't need much of the functionality and think that its a great project for really teaching me SS)
That said, I thought about doing it without any modules but wasn't sure how to handle the Holder/sub-holder/image relation that I think I need.
I therefore came to think that the dataobjectmanager with file and image extension might be a good place to work from.
I am however very much a newbie to coding in SS, so I was hoping someone might jump in and lend a hand upfront by suggesting a method of structuring the system.

What I want is:
- a gallery listing page (thumbnail, title, short gallery description)
- gallery page (showing the selected image (default 1st), other thumbnails, image description, photographer, models (can be more that one), and the ability to load the next image via URL params since I want to also add my own ajax loading at a later date)

I guess thats mostly it... any advice would be greatly appreciated?

Avatar
DsX

Community Member, 178 Posts

16 September 2010 at 6:05am

Edited: 16/09/2010 6:08am

OR, can I develop a custom viewer for ImageGallery, and extend ImageGallery with my custom fields??

I found this thread [http://www.silverstripe.org/dataobjectmanager-module-forum/show/288245] suggesting that I should not use the ImageGallery module...
is there a code example that is kind of along the line of what I'm aiming for?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

16 September 2010 at 7:56am

As the author of the ImageGallery module, as well as that post that seemingly undermines it, I can tell you that what you're looking for is pretty much covered by the functionality of the ImageGallery module, but I think it's smart of you to want to build it from scratch. A gallery is a great way to get your hands dirty with SilverStripe. You'll get exposure to data relationships, custom templating, etc., and that's all good stuff that can be applied to just about any project.

I can help you get started coding your gallery, but I'm a little unclear on your specs. I can't really make out the difference between your "gallery listing page" and your "gallery page".. And what do you mean by "other thumbnails"?

Do you have a mockup or anything?

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
DsX

Community Member, 178 Posts

16 September 2010 at 8:35am

Edited: 17/09/2010 3:15am

Thanks UncleCheese... you are always so helpful. Greatly appreciated!

You can see my current gallery here: gone :)

that page is what I meant by the gallery listing page, since each thumbnail represents a different gallery
clicking on one of these galleries, opens the gallery.
you can then navigate through the images.

as you can see this site is rather outdated now, and I am working on the upgrade. So the galleries would ideally have thumbnails listed below the image being shown, as well as, the next and back buttons.
I would like each image to have its own url as this gallery does, I will then add ajax loading later.

Does that make it so that I am looking at a galleryHolder, and a galleryImage page types? (as a non-DataObjectManager gallery I thought I might need 3 levels: GalleryList, gallery, and image)
Haven't got my head wrapped around the DataObject relations yet. I will be playing with the demo code more.. hopefully it soaks in.

Avatar
DsX

Community Member, 178 Posts

16 September 2010 at 8:38am

Edited: 17/09/2010 3:15am

ps: I have used gallery before, with the slideshowpro module... I extended it and added templates for monoslideshow.
You can see it running here: gone
being fed and managed here: gone :)

just thought you might like seeing what I have done with them... (ps: you were great help during that process... and I am getting a much better handle on SS)

Avatar
DsX

Community Member, 178 Posts

17 September 2010 at 3:17am

Edited: 17/09/2010 4:36am

found a nice basic walk through tutorial here: http://deadlytechnology.com/silverstripe/silverstripe-image-gallery/
seems to be getting me started, I am now trying to create a holder for the galleries... taking baby steps.

still if you have word of wisdom, or some warnings about commons hurdles

just found your silverstripe blog http://www.leftandmain.com/ GREAT!! I will be reading everything on it.

Cheers