Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » HasManyFileManager: New CMS module/extension. Testers/review needed

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

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

Page: 1 2 3 4 5 6 7 8
Go to End
Author Topic: 104150 Views
  • banal
    Avatar
    Community Member
    901 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    @Tyndie
    No, currently there is no way to set the base folder in your Page class. It is hardcoded in the AttachedFile.php.
    Instead of creating subfolders, you could just change your grouping? Something like:
    Season-2008-2009_PDF
    Season-2008-2009_Images
    etc.

    I noted the customizable folder thing as a feature request for a later release...

  • erwanpia
    Avatar
    Community Member
    63 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    Hello it's me again . Found why extra variables were not working on the front end : I was actually having a conflict with the gallery module, that also has a dataobjectdecorator for the File object. Removing the DataObject::add_extension( 'File', 'GalleryFile' ); from /gallery/_config solved the issue but doesn't tell me how to use both extension on Silvesrtripe . I suppose we'd have to share the decorator ... I also wonder why the decorator instruction from mysite was used in the HasManyFileManager ... Anyway FileManager is much better than gallery for displaying image thumbnails isn't it ?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    Hi erwanpia

    Ouch, bad news! Thanks for figuring that out (i placed it as a "known issue" in the README and i'll update the Documentation).
    I'll install the Gallery Module on my local machine and try to find a solution. Maybe you could decorate the galleries decorator with the FileManager decorator (eg. DataObject::add_extension( 'GalleryFile', 'YourCustomFile' );) ? As far as i remember the Decorator Pattern, that should work actually...

    On the other hand there's probably not a lot of people who will use both modules on one Site, since they can do similar stuff.
    The good thing about the gallery is, that it already has frontend functionality (using Lightwindow). When using the HasManyFileManager, you are basically on your own when it comes to the appearance and functionality of your gallery. Some may like that (i do), others don't ;)

  • erwanpia
    Avatar
    Community Member
    63 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    Hi that gives me some idea : I a mtryuing to customize the type of gallery being showed

    I have added a dropdown field in your FilePage :

    static $db = array("CustomTheme" => "Varchar");
    ...
    $options = array("SimpleGallery"=>"SimpleGallery", "SlideGallery" =>"SlideGallery");
    $fields->addFieldToTab("Root.Content.Main",
    new DropdownField("CustomTheme", "CustomTheme", $options));

    and I try to use the controller to change the Layout (Layout/SimpleGallery.ss or Layout/SlideGallery.ss) WHILE KEEPING the main theme

    [edit] this solution seems to work here :

    class FilePage_Controller extends Page_Controller {
       function index() {
       $custom = $this->customise(array(
             "Content" => $this->customise( )->renderWith($this->CustomTheme)
          ));
          
          return $custom->renderWith('Page');
        }

       
    }

  • banal
    Avatar
    Community Member
    901 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    That's pretty cool actually! This could really be useful for some sites, never thought of that.
    Maybe you should post that to the recipes Section in the wiki so that it doesn't get lost

  • AndiAndi
    Avatar
    Community Member
    2 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    I try to use this module outside of the CMS. Has anyone done that before? I thought I would use it for the blog module so that blog users could make posts with several media files without touching/logging into the SS cms. I find this module very interesting, and if I were able to use it for my front as well, it would be marvelous.

  • banal
    Avatar
    Community Member
    901 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    @AndiAndi
    I never tried that. I guess you'd have to change several things in order for it to work. I'm not really experienced with this kind of frontend stuff using SilverStripe. For now, i added it to my list of feature-requests.

  • Laax
    Avatar
    Community Member
    14 Posts

    Re: HasManyFileManager: New CMS module/extension. Testers/review needed Link to this post

    Hi banal,
    this module is exactly what i was looking for since i began on SS. I do lots of slideshows and until now i used to have an imagepage class for each image so i could have the reordering drag n drop.
    But i fell on a pb adding an ImageField with a custom File class. I need to have a custom thumbnail for each image/file. When creating a file in the CMS, it says I can upload the thumbnail once the entry is saved, but even saved, I still can't..

    Hope you will figure out what happening there. (screenshot attached)
    Thx

    104150 Views
Page: 1 2 3 4 5 6 7 8
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.