Note:- “Webkul” is your company name and Test is module name
Folder structure
for hello word module
files are following
app/code/Webkul/Test/etc/config.xml
<?xml version="1.0"?> <config> <modules> <Webkul_Test> <!--Module discription--> <version>1.0.0</version> <active>true</active> </Webkul_Test> </modules> <frontend> <layout> <updates> <webkul_test module="Webkul_Test"> <file>layout.xml</file> </webkul_test> </updates> </layout> </frontend> </config>
app/code/Webkul/Test/Block/Hello.php
<?php class Webkul_Test_Block_Hello extends Mage_Core_Block_Template{ } ?>
app/design/frontend/default/demo/Webkul_Test/layout.xml
<?xml version="1.0"?> <layout version="0.1.0"> <catalog_product_view> <reference name="content"> <block type="Webkul_Test_Block_Hello" name="wk-block" template="hello.phtml" /> </reference > </catalog_product_view> </layout>
app/design/frontend/default/demo/Webkul_Test/Hello.phtml
<?php ?> <h2>hello new magento</h2>
Be the first to comment.