Home    Articles

 

How to remove the tags block from magento product page?

 

This is an very easy task:
You are probably working on your theme.
You need to find the tag.xml file that is located into app/design/frontend/default/YOUR_THEME/layout/, now open it.

If there is no such file you need to copy it from magento base theme: app/design/frontend/base/default/layout/.

Now open it and find this string: “catalog_product_view” you should find it on line 66.

The entire block should look like this:

<catalog_product_view translate="label">
        <label>Catalog Product View</label>
         <!-- Mage_Tag -->
        <reference name="product.info.additional">
            <block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml">
                <block type="page/html_wrapper" name="product.tag.list.list.before" as="list_before" translate="label">
                    <label>Tags List Before</label>
                    <action method="setMayBeInvisible"><value>1</value></action>
                </block>
            </block>
        </reference>
    </catalog_product_view>

From it, remove this:

<block type="tag/product_list" name="product_tag_list" before="-" template="tag/list.phtml">
                <block type="page/html_wrapper" name="product.tag.list.list.before" as="list_before" translate="label">
                    <label>Tags List Before</label>
                    <action method="setMayBeInvisible"><value>1</value></action>
                </block>
   </block>

The tags block is no longer set to apear there.
This is the right way to do it.

Enjoy.

by