开发者

Magento - show a module block in many pages

开发者 https://www.devze.com 2023-02-24 01:20 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消