0

I need to remove a block that is set by the page.xml the rwd folder / default / layout. The code of one of them is this:

        <block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
            <block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
                <label>Page Footer</label>
                <action method="setElementClass"><value>bottom-container</value></action>
            </block>

In my research, I saw that it is possible to remove by creating a file called local.xml within the layout, but I have an option to hide/ visible within my module and must be removed through my file custom.PHTML, how as I do this? Thanks

2 Answers2

1

You cannot remove layout handles from phtml files. The template files are interpreted after the layout xmls are loaded.

Marius
  • 197,939
  • 53
  • 422
  • 830
0

Marius is right. You need to use local.xml for this kind of operation. In my opinion and based on my experience, this is what we need to do by local.xml file. Means it is a special layout update file which is used to remove unwanted blocks and block settings (means give a new action to a block). So use it wisely.

Rajeev K Tomy
  • 17,234
  • 6
  • 61
  • 103