Surya prakash Patel
Surya prakash Patel

Reputation: 1522

template is not loading in magento custom module

i am customizing magento module for frontend, I have add a page but this page is not showing content, advice me where i a wrong. bellow are my code :

class Gaboli_Warehouse_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();     
        $this->renderLayout();
    }
}

Block -

class Gaboli_Warehouse_Block_Location_List extends Mage_Core_Block_Template
{

   public function __construct()
   {
      parent::__construct();
   }
}

Layout xml -

<?xml version="1.0"?>
<layout  version="0.1.0">

   <warehouse_index_index>
        <reference name="content">
            <block type="warehouse/location_list" name="warehouse_location" template="gaboli/warehouses.phtml" />
        </reference>
    </warehouse_index_index>

</layout>

Upvotes: 0

Views: 103

Answers (1)

Navin Bista
Navin Bista

Reputation: 2128

Have you checked whether the execution reaches to your template file. Execute die('here'); statement in your template file and see whether it gets there or not. If not there may be problem in the template path you asssign here.

<block type="warehouse/location_list" name="warehouse_location" template="gaboli/warehouses.phtml" />

Other codes seems fine.

Reply where you get into this.

Hope this will help.

Upvotes: 1

Related Questions