21294 Posts in 5734 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 168 Views |
-
Limit amount of DataObjects

20 October 2012 at 12:23am
Hi all,
I have a gallery page with an image class that extends DataObject. I want to allow CMS users to add up to 10 images, using the gridfield. How can I impose this limit?
I guess I could use onBeforeWrite to check the amount that already exist, but surely there's a better way (besides, I'm not confident that would work with the GridFieldBulkEditingTools I'm using).
Thanks
-
Re: Limit amount of DataObjects

23 October 2012 at 11:17pm
Possibly you could try to check the amount of objects for the given page in the objects canCreate() function and return false if the limit has been reached...
| 168 Views | ||
|
Page:
1
|
Go to Top |

