Magento Load template in template


Magento Load template in template : You can load template in template directly
as following.


Magento Load template in template

Mage::app()->getLayout()
                        ->createBlock('core/template')
                        ->setData('yourData',$yourData)
                        ->setTemplate('yourTemplatePath/yourTemplateName.pthml')->toHtml();

You can get the data passed to your template “yourTemplateName.pthml” data as below:

$data = $this->getData('yourData');

User Ans/Comments

📖 Read More


Advertisements