1

using Magento 1.9,

Can anyone let me know that how can i remove, header or footer as per config settings for my custom module.

I tried below but not working:

<mymodule_index_index>
        <remove name="header" ifconfig="general/layout/enable" />
        <remove name="footer" ifconfig="general/layout/enable" />
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="mymodule/mymodule" name="mymodule" template="mymodule/mymodule.phtml"/>
        </reference>
 </mymodule>
  • 2
    ifconfig is only processed as an action attribute. – benmarks Oct 26 '15 at 6:17
4

Maybe something like this :

<reference name="root">
    <action method="unsetChild" ifconfig="general/layout/enable">
       <child>header</child>
    </action>
    <action method="unsetChild" ifconfig="general/layout/enable">
       <child>footer</child>
    </action>
</reference>

I'm not sure if that is where your error lies - more specifics on what isn't working may help. Just in case, make sure you are referring to the correct admin config setting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.