/* Only operate on new resources */ if (!($mode == modSystemEvent::MODE_NEW)) { return; } /* Set all new resources not at the root of the tree to use template 12 */ $parent = $resource->get('parent'); if (! empty($parent)) { $resource->set('tempate', '12'); $resource->save(); } return '';
https://modx.com/extras/package/inherittemplate