I am new in Magento. I am trying to develop a custom module for Magento Admin panel. My codes are as follows
Location : app/etc/modules
Digitab_Brandlogo.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Digitab_Brandlogo>
<active>true</active>
<codePool>local</codePool>
</Digitab_Brandlogo>
</modules>
</config>
Location : app/code/local/Digitab/Brandlogo/Block/Adminhtml
logo.php
<?php
class Digitab_Brandlogo_Block_Adminhtml_slider extends Mage_Adminhtml_Block_Widget_Grid_Container
{
public function __construct()
{
$this->_controller = 'adminhtml_brandlogo';
$this->_blockGroup = 'brandlogo';
$this->_headerText = Mage::helper('brandlogo')->__('Brand Logo Manager');
$this->_addButtonLabel = Mage::helper('brandlogo')->__('Add Brand');
parent::__construct();
}
}
Location: app/code/local/Digitab/Brandlogo/controllers/Adminhtml
IndexController.php
<?php
class Digitab_Brandlogo_Adminhtml_BrandlogoController extends Mage_Adminhtml_Controller_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
location: app/code/local/Digitab/Brandlogo/etc
config.xml
<?xml version="1.0"?>
<config>
<modules>
<digitab_brandlogo>
<version>1.0.0</version>
</digitab_brandlogo>
</modules>
<global>
<models />
<blocks />
<resources />
<extraconfig />
<helpers>
<digitab_brandlogo>
<class>Digitab_Brandlogo_Helper</class>
</digitab_brandlogo>
</helpers>
</global>
<admin>
<routers>
<digitab_brandlogo>
<use>admin</use>
<args>
<module>Digitab_brandlogo</module>
<frontName>brandlogo</frontName>
</args>
</digitab_brandlogo>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<brandlogo>
<file>brandlogo.xml</file>
</brandlogo>
</updates>
</layout>
</adminhtml>
</config>
location: app/code/local/Digitab/Brandlogo/etc
adminhtml.xml
<?xml version="1.0"?>
<config>
<menu>
<digitab translate="title" module="digitab_brandlogo">
<title>Digitab</title>
<sort_order>110</sort_order>
<children>
<brandlogo>
<title>Brand Logo</title>
<sort_order>1</sort_order>
<action>brandlogo/adminhtml_brandlogo</action>
</brandlogo>
</children>
</digitab>
</menu>
</config>
location: app/code/local/Digitab/Brandlogo/Helper
Data.php
<?php
class Digitab_Brandlogo_Helper_Data extends Mage_Core_Helper_Abstract
{
}
location: app/design/adminhtml/default/default/layout
brandlogo.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<brandlogo_adminhtml_brandlogo_index>
<reference name="content">
<block type="brandlogo/adminhtml_brandlogo" name="brandlogo" template="test.phtml"/>
</reference>
</brandlogo_adminhtml_brandlogo_index>
</layout>
location:app/design/adminhtml/default/default/template
test.phtml
ABCD
I am getting output like below
How can I display the template ?? Can anyone help me in this regard?? Thanks
Update
I modified my files as below, but it is not working.
Location : app/etc/modules
Digitab_Brandlogo.xml
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Digitab_Brandlogo>
<active>true</active>
<codePool>local</codePool>
</Digitab_Brandlogo>
</modules>
</config>
Location : app/code/local/Digitab/Brandlogo/Block/Adminhtml
Brandlogo.php
<?php
class Digitab_Brandlogo_Block_Adminhtml_Brandlogo extends Mage_Adminhtml_Block_Widget_Grid_Container
{
public function __construct()
{
$this->_controller = 'adminhtml_brandlogo';
$this->_blockGroup = 'brandlogo';
$this->_headerText = Mage::helper('brandlogo')->__('Brand Logo Manager');
$this->_addButtonLabel = Mage::helper('brandlogo')->__('Add Brand');
parent::__construct();
}
}
Location: app/code/local/Digitab/Brandlogo/controllers/Adminhtml
BrandlogoController
<?php
class Digitab_Brandlogo_Adminhtml_BrandlogoController extends Mage_Adminhtml_Controller_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
location: app/code/local/Digitab/Brandlogo/etc
config.xml
<?xml version="1.0"?>
<config>
<modules>
<digitab_brandlogo>
<version>1.0.0</version>
</digitab_brandlogo>
</modules>
<global>
<models />
<blocks>
<brandlogo>
<class>Digitab_Brandlogo_Block</class>
</brandlogo>
</blocks>
<resources />
<extraconfig />
<helpers>
<digitab_brandlogo>
<class>Digitab_Brandlogo_Helper</class>
</digitab_brandlogo>
</helpers>
</global>
<admin>
<routers>
<digitab_brandlogo>
<use>admin</use>
<args>
<module>Digitab_brandlogo</module>
<frontName>brandlogo</frontName>
</args>
</digitab_brandlogo>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<brandlogo>
<file>brandlogo.xml</file>
</brandlogo>
</updates>
</layout>
</adminhtml>
</config>
location: app/code/local/Digitab/Brandlogo/etc
adminhtml.xml
<?xml version="1.0"?>
<config>
<menu>
<digitab translate="title" module="digitab_brandlogo">
<title>Digitab</title>
<sort_order>110</sort_order>
<children>
<brandlogo>
<title>Brand Logo</title>
<sort_order>1</sort_order>
<action>brandlogo/adminhtml_brandlogo</action>
</brandlogo>
</children>
</digitab>
</menu>
</config>
location: app/code/local/Digitab/Brandlogo/Helper
Data.php
<?php
class Digitab_Brandlogo_Helper_Data extends Mage_Core_Helper_Abstract
{
}
location: app/design/adminhtml/default/default/layout
brandlogo.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<brandlogo_adminhtml_brandlogo_index>
<reference name="content">
<block type="brandlogo/adminhtml_brandlogo" name="brandlogo" template="test.phtml"/>
</reference>
</brandlogo_adminhtml_brandlogo_index>
</layout>
location:app/design/adminhtml/default/default/template
test.phtml
ABCD
But it is not working. Now I can see a blank white page in admin panel. Thanks