I have a plugin using the 'onDocFormRender' event to set a resource's template to a custom template, when it the resource has a particular parent. The (simplified) code is something like:
if ( $mode == modSystemEvent::MODE_NEW ) {
$modx->controller->setProperty('template', 4);
}
What I'd also like to do is to make sure that this is a Static Resource and not a Document.
Is it possible to do change the type of resource when someone decides to creates a new document at this point, and to change it to be a static resource if they have accidentally chosen to create another type?