I guess that I could do this by modifying the InheritParentTemplate plugin but I was not successful. This is what I got, I added an check to identify the parent id by a constant value, otherwise the pluging should continue to work as before. In this case the container I want to set the default template for is id 12:
<?php
global $content;
$e = &$modx->Event;
switch($e->name) {
case 'OnDocFormPrerender':
if(($_REQUEST['pid'] > 0) && ($id == 0)) {
if($_REQUEST['pid'] == 12) {
$content['template'] = "template name";
}
elseif ($parent = $modx->getPageInfo($_REQUEST['pid'],0,'template')) {
$content['template'] = $parent['template'];
}
}
break;
default:
return;
break;
}
?>
Anyone spot why this is not working?