$listBusBlock = $listOfBuses->getLayout()->createBlock('Imonn\Bookings\Block\Buslist')->setTemplate('Imonn_Bookings::Busbooking/listOfBusses.phtml')->toHtml(); $this->getResponse()->setBody($listBusBlock);
in the above PHP code, I want to add $listBusBlock between the header and footer.
If I use
$this->getResponse()->setBody($listBusBlock); the content is set to the entire body and the header and footer are gone.
what should I use instead of setBody so that the content can be added between the header and footer.