(it's a very difficult thing to try and look up in the docs ...)

I have an Event system built on top of SilverStripe/Blog, but I also have just a Blog. Due to Event extending BlogPost, I can also create Events under my Blog, which isn't what I want.

In SS3 I could do Blog: allowed_children: *BlogPost, with the * indicating no subclasses of BlogPost should be allowed there.

How to do this in SS4? SilverStripe\Blog\Model\Blog: allowed_children: '*SilverStripe\Blog\Model\BlogPost' doesn't work... (edited)

Hmm, yeah if I adjust VersionedGridFieldState to inspect the join record it works how I’d expect… I’ll open an issue with my ramblings

https://github.com/bummzack/sortablefile (edited)

Attachments:
bummzack/sortablefile
👍 (1)

@LiamC drag/drop for reordering each gallery? Yes, with a manymany_extraField

@wmk yep could do that of course, would just be nice to see the correct i18n number format in the columns by default...

then it should be worth opening an issue (if it's not issued already)

Can’t find anything... I don’t know exactly how i18n numberformatting is implemented in SilverStripe, used to be a can of worms in older versions...

well, look at NumberField's code which seems to be the latest code and try to utilise it for DBFloat

  1. $fields->addFieldToTab(
  2. 'Root.Gallery',
  3. $uploadField = new UploadField(
  4. $name = 'GalleryImages',
  5. $title = 'Upload one or more images (maximum 10)'
  6. )
  7. );
  8. $uploadField->setAllowedMaxFileNumber(10);
  9. $uploadField->setFolderName('ProductImages');

if you have many_many with images to create a gallery can you implement drag and drop on that?

@robbieaverill what do you think about that? worth an issue? ^^

Probably. There’s a bunch of updates in this area that need to be done to use NumberFormatter for i18n support - most notable is the currency field