Magento 1.9 – Call Another Plugin Block Method in Custom Template File

magento-1.9phtmltemplate

I want to call another module block in custom phtml file in magento

Here is layout file tablisting.xml:
path: app\design\frontend\default\default\layout\sm\tablisting.xml

<?xml version="1.0"?>   
<layout version="1.0">
<default>
    <reference name="head">
        <action method="addCss"><stylesheet>sm/tablisting/css/tablisting.css</stylesheet></action>
    </reference>
</default>
<tablisting_index_index>
    <reference name="content">
        <block type="tablisting/list" name="tablisting">
            <action method="setConfig">
            </action>
        </block>
    </reference>
</tablisting_index_index>   

I have create a template file homecolumn.phtml

Here is template file homecolumn.phtml:
app\design\frontend\default\sm_saphi\template\page\homecolumn.phtml

<?php
echo $this->getChildHtml('tablisting');

But it is not show any block in homepage

Best Answer

Finally I have find my answer.

Please add this code in template file homecolumn.phtml: path:app\design\frontend\default\sm_saphi\template\page\homecolumn.phtml

<?php
 echo  Mage::app()->getLayout()
    ->createBlock('tablisting/list')
    ->setTemplate('page/homecolumn.phtml')
    ->toHtml();
Related Topic