Jump to:

22996 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » UploadField Thumbnails and other issues SS3

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 337 Views
  • tazzydemon
    Avatar
    Community Member
    114 Posts

    UploadField Thumbnails and other issues SS3 Link to this post

    I have already posted this to forms but no replies so maybe more luck here

    I have created an Orbit slider class to go with my Zurb Foundation template (which I am planning to submit for public use). This class has some couple of small issues as detailed below:

    1. If I use the UploadField to choose an image "from files" the resulting popup is correct and in the correct directory but does not show the image thumbnails that are available in the Files repository. What is the config to enable this - or is there one at all? It is very hard to choose images if you can't see them.

    2. How do I disable the upload buttons when there is already one image selected. This is supposed to be automatic in a has_one and I have set allowedMaxFileNumber' => 1 to no avail.

    3. When I create a new Orbit image and choose an image "from files" it fails, as there is no actual object to attach it to. I see there is a setRecord() method available and if I add

    $imageField->setRecord($this);

    In the getCMSFields() function then at least I get a warning to save the new object first. For the unwary though, the save button by default says "Create" whereas the warning text is by default "Files can be attached once you have saved the record for the first time." which will lead some users to quiz the operation. How might I save this object immediately it's instantiated.

    Curiously, if I upload a fresh image to an unsaved new Orbit image this seem to happen automatically and it works fine.

    Any ideas appreciated.

  • suntrop
    Avatar
    Community Member
    131 Posts

    Re: UploadField Thumbnails and other issues SS3 Link to this post

    Hi!
    Have you found a solution?

    I wanted to have thumbnails in SS for 4 years now Version 3 came with some sort of improvement, but it looks quite buggy

    I don't know why they don't care about this issue. You really can't select images without seeing them! Filenames are good unless you've got more than 10 images …

    337 Views
Page: 1
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.