Hi There,
I am looking for a way to fix the number of items of a ComplexTableField within the CMS. I.e. I have a page thas has_many pages as teasers, and i want the authors to set exactly (or at least not more than) 5 teasers. I checked the reference but found no thing like $TeaserTable->maxItems = 5. Is there anything like this?
As workaround, I tried to modify the authors user rights so they can't add or delete any items. (So the admin could set 5 of them and the the authors could change them, but not change their numbers). I added
public function canDelete($Member = null)
{
return Permission::check('DELETE_TEASER');
}
to the Teaser Object, this worked. But public function canAdd($Member = null)
{
return Permission::check('ADD_TEASER');
}
shows no impact on the bottom 'Add Teaser' line of the table overview.
Any Ideas?
Thanks a lot for any hint! :)
SF