5

is it possible to remove both the header and footer and only display the contents of a CMS page? If so, how?

Currently the html looks something like this by default:

<body class=" cms-page-view cms-info-shipping cms-info-shipping">
    <div id="header">...</div>
    <div id="content">...</div>
    <div id="footer">...</div>
</body>

Thanks in advance for any elucidation.

14

when editing the cms page, there's a field called layout update. use this code in it:

<reference name="root">
    <remove name="header"/>
    <remove name="footer"/>
</reference>
  • This will work but only if the layout you are using have this names for the header/footer block – mbalparda Dec 10 '14 at 19:18
  • and if you're not using certain plugins, and heavy caching... it was a raw magento question, no other specs. by default, those blocks are called that way in magento. there's no need for an extra file (plus a package and a theme) just to remove the header and footer. it's a good approach to other things, but i wouldn't use it in this case – Cristi Dec 10 '14 at 19:22
  • @Cristi Is possible to change header and footer for multi-store with the same theme. – zus Dec 25 '17 at 12:23
  • How to add two header for multi store – zus Dec 26 '17 at 6:22
  • @zus yes it is, but it depends on your setup – Cristi Dec 26 '17 at 13:38
3

CMS pages have a layout associated to it.

You can create a custom layout and remove everything you dont want to have in the page and then assign it to the CMS page in the Design tab.

3

In admin section there are options to set the layout of CMS page. Please choose empty.

It will remove the header and footer and only shows the content of CMS page.

CMS > Edit CMS Page > Design > Layout > empty.
  • @mishra : If you using multi-store, this trick not working. – zus Dec 26 '17 at 6:32

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.