Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » The new Gallery Module

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

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

Page: 1 2 3 4
Go to End
Author Topic: 20890 Views
  • The Frenchy
    Avatar
    Core Development Team
    40 Posts

    The new Gallery Module Link to this post

    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.

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: The new Gallery Module Link to this post

    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.

  • The Frenchy
    Avatar
    Core Development Team
    40 Posts

    Re: The new Gallery Module Link to this post

    The gallery doc has been created

  • The Frenchy
    Avatar
    Core Development Team
    40 Posts

    Re: The new Gallery Module Link to this post

    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

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: The new Gallery Module Link to this post

    Great work Romain

  • Hani
    Avatar
    12 Posts

    Re: The new Gallery Module Link to this post

    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!

  • Hani
    Avatar
    12 Posts

    Re: The new Gallery Module Link to this post

    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

  • The Frenchy
    Avatar
    Core Development Team
    40 Posts

    Re: The new Gallery Module Link to this post

    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

    20890 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.