Magento - show a module block in many pages
i have created a module with a block that I want to show in many pages; for example : shopping cart, right column, and shopping cart wi开发者_运维问答th no-items.
How can I do that ?
Thanks.
Add the block to your layout wherever you want to see it. You can add a block to any handle like this:
<layout_handle>
<reference name="parent_block_name">
<block type="yourmodule/your_block_handle" name="block.name" template="path/to/template.phtml" />
</reference>
</layout_handle>
There's no reason you cannot do this for several layout handles.
精彩评论