CakePHP 4 Cambiar la vista de diseño en un método
//chnage the layout in Cakephp 4 with the layout file called ajax.php
$this->viewBuilder()->setLayout('ajax');
Fierce Falcon