Hi, all.
I have some custom page types, and I only want ONE page of these types to be created.
So I add the following:
/**********************************************************************/
public function canCreate($member = null) {
/**********************************************************************/
return !DataObject::get_one($this->ClassName);
}
and it works well.
BUT... the CMS doesn't let me rearrange the pages. I can't drag and drop them along the site tree.
How can I limit the number of pages?
I've thought of doing something with onBeforeWrite() but that doesn't remove the custom pages from the list of possible page types.