I have created a custom block page. I want to call custom block to another phtml file.
When I called custom block in xml file is working.
But when I called custom block in phtml file is not working.
getLayout() ->createBlock('Codism\Csr\Block\Index\TopMenu') ->setBlockId('Codism_Csr::menu.phtml') ->toHtml(); ?><?php echo $block->getLayout() ->createBlock('Codism\Csr\Block\Index\TopMenu') ->setBlockId('Codism_Csr::menu.phtml') ->toHtml(); ?>