PHP Magento Tips

How to Remove class std from CMS Page in Magento

Rate this posting:
{[['']]}

In Magento sometime we require to remove “std” class from CMS pages to set proper design as per HTML.

You can achieve it with below two options.

Option 1:

Create file in app/design/frontend/rwd/default/layout/local.xml and add below code in it:

<?xml version="1.0"?>

<layout version="0.1.0">
<!--
Remove <div class="std"></div> from most of the pages
-->
<cms_page>
    <reference name="content">
        <action method="unsetChild">
            <alias>cms.wrapper</alias>
        </action>
        <block type="cms/page" name="cms_page"/>
    </reference>
</cms_page>
</layout>


Option 2:

Insert this code inside the CMS Design tab under Page layout >> Layout Update XML textbox. With this code you can disable the div class="std" tag for that Particular CMS page.

<reference name="content">

<action method="unsetChild">
  <alias>cms.wrapper</alias>
</action>
  <block type="cms/page" name="cms_page"/>
</reference>
Tag : Magento
0 Comments On "How to Remove class std from CMS Page in Magento"

Back To Top