Magento create block from controller php code August 22, 2015/0 Comments/in Magento2 /by puneetk00 $block = $this->getLayout()->createBlock(‘customer/form_login’)->setTemplate(‘persistent/customer/form/login.phtml’); $this->getResponse()->setBody($block->toHtml()); this code write in your controller you have to no write in xml layout Puneet Kumar Magento Developer http://mg2dev.com/wp-content/uploads/2023/06/logo-transparent-png-300x86.png 0 0 puneetk00 http://mg2dev.com/wp-content/uploads/2023/06/logo-transparent-png-300x86.png puneetk002015-08-22 05:48:002015-08-22 05:48:00Magento create block from controller php code
Leave a Reply
Want to join the discussion?Feel free to contribute!