CakePHP 5.x and probably earlier versions, override default layout in /src/templates/Pages/home.php by starting that file with php that contains several use directives, then :
$this->disableAutoLayout();