step1-Create block file (.phtml) in your template folder.
step 2-Then goes to layout folder and open yourmodulename.xml file (yourmodulename.xml is as you module) if this file not exist in layout folder then check in config.xml file of your module and find following code
<adminhtml>
<layout>
<updates>
<quicklogin>
<file>quicklogin.xml</file>
</quicklogin>
</updates>
</layout>
</adminhtml>
in the string use is the name of your module layout.xml here module layout file is “quicklogin.xml”
the open it and add the following code
<?xml version="1.0"?>
<layout version="0.1.0">
<default>
<!-- here add block which you want to display on every page of your website!-->
<block type="core/template" name="quicklogin" output="toHtml" template="quicklogin/quicklogin.phtml" />
</default>
<!--after default tag we add blocks which we want to display on particular page !-->
<catalog_product_view><!--this identify the product page!-->
<reference name="right"><!--reference define the layout!-->
<block type="core/template" name="wk-block" output="toHtml" before="cart_sidebar" template="catalog/product/wk_block.phtml" />
</reference>
</catalog_product_view>
</layout>
///
explanation of block tag attributes
type: define the type of data which display in this block it is Basically the name of class which return it,
name:identify you block,
output:output formate,
before and after: where your block stay in that layout,
template:path of your block file(.phtml) which you create for content of your block
///

Be the first to comment.