Magento Create a block to include a template file .phtml with just one line of code


/ Published in: PHP
Save to your folder(s)

Create a block to include a template file .phtml with just one line of code


Copy this code and paste it in your HTML
  1. <?php echo $this->getLayout()->createBlock('Mage_Adminhtml_Block_Template', 'block-name')->setData('template', 'callouts/your-file.phtml')->toHtml() ?>

URL: http://snippi.net/magento-create-block-include-template-file-phtml-just-one-line-code

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.