4

Controlling how static blocks are displayed in Magento

 2 years ago
source link: https://markshust.com/2011/06/29/controlling-how-static-blocks-are-displayed-magento/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Controlling how static blocks are displayed in Magento

June 29, 2011   ·   1 min read  ·   Edit on GitHub

To disable a static block globally, go to CMS > Static Blocks > Select One > set Status = Disabled > Save

To control the disable of static blocks on various pages, to go CMS > Widgets > Select One > Reference “Layout Updates” section

To remove a specific block for a specific page, go to CMS > Pages > Manage Content > Select One

Click the currently published Revision number on the initial page > Click the Design tab on the left

In the Layout XML section paste in the appropriate block of code dependent on the block you want to remove, for example to unset everything from the left sidebar:

<reference name="left">
    <action method="unsetChildren"></action>
</reference>

To unset a certain static block (named nameofblock) from the right sidebar:

<reference name="right">
    <action method="unsetChild">
        <name>name_of_block</name>
    </action>
</reference>

You can find the id of the static block by going to CMS > Static Blocks and looking up the value in the column Identifier.

Are you a Magento geek?

Signup for my newsletter and I'll let you know about Magento-related blogs, courses & more.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK