In the previous versions of KEntico it was just a standard document event handling logic. Just compiled into a DLL. There was an event handler listening on before insert - the code checked whether the desired pages exist, if yes, nothing happened. If not, the desired pages structure has been created.