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.

Archive /

Our old forums are still available as a read-only archive.

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

The new Gallery Module


Go to End


28 Posts   23445 Views

Avatar
The Frenchy

Core Development Team, 40 Posts

19 July 2007 at 5:20pm

Edited: 20/07/2007 1:59pm

The first version is now released !

To see the gallery in your page, just create a GalleryPage.ss file or edit your Page.ss file and add this code :

[html]
<% include GalleryPageContent %>
[/html]

Click here to download it !

More details about the requirements and functionalities will be available in the documentation soon.

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

20 July 2007 at 7:03am

Cool! I created a "GalleryPage" and it seems to work nicely.
I look forward to trying out the "FileRepository" page type. It might be very useful for creating a File Downloads page. :)

Avatar
The Frenchy

Core Development Team, 40 Posts

20 July 2007 at 12:08pm

The gallery doc has been created

Avatar
The Frenchy

Core Development Team, 40 Posts

20 July 2007 at 12:10pm

Moreover, you will see that the Download Page will probably be a part of the next version and as you have said, it will not be difficult to do this thanks to FileRepository.php

Avatar
Tim

Community Member, 201 Posts

20 July 2007 at 1:23pm

Great work Romain :-)

Avatar
Hani

12 Posts

1 August 2007 at 7:16pm

Thanks for this great module, Romain!

I favor the look and feel of lightbox (v2), so I tweaked it for my needs and got that working. Now that I have photo galleries functional, I am looking at the "FileRepository" aspect.

Is this module currently ready to display items in an asset folder (as a list) other than photos? I noticed that the code in FileRepository.php shows:

/** Fall-back in case there are no file extensions, just get everything from the folder **/
return DataObject::get("File", "`ParentID` = '{$this->FolderID}'", "", "", $limit);

Does this mean that if there are no image files in the folder, it will list everything in it?

I created an asset folder filled with PDF files, but I haven't been able to get them listed under a FileRepository page. I created a FileRepository.ss file - trying both "<% include FileRepositoryContent %>" and "<% include GalleryPageContent %>" to show the files - but it didn't work.

Am I doing something wrong, or is this module simply not yet ready for files other than the allowed image extensions? If it is not ready, do I simple create a new page, for example, PdfPage.php using GalleryPage.php as a rough template?

I sincerely appreciate any help!

Avatar
Hani

12 Posts

2 August 2007 at 1:38pm

I think I figured it out. =) On the verge.....

However: I found a bug in the dropdown list under the "Files" tab when you create a new GalleryPage.

Detailed here: http://www.silverstripe.com/bugs/flat/3285?showPost=3285

Avatar
The Frenchy

Core Development Team, 40 Posts

3 August 2007 at 11:24am

As for the will to add other files in the gallery, this functionality will be available in the next version of the gallery module that I am working on now.

Moreover, I can already tell you that I have updated the Lightbox version of the gallery module as the last one and also added a navigation system in it.

the next step is to put other media files in the gallery.

I'm on it :-)

Go to Top