How do I remove the 'tags' block from a product page?
I'm trying to remove the tagging feature from product pages in my Magento install.
Here are the steps I followed to try to do that:
- Disabled caching in the Magento admin pages
- Cleared my browser cache
- Disabled Tags in the admin pages both for default config and individual stores (Dashboard > System > Config > Advanced > Mage_Tag > Disable > Save was the method I used)
- Commented out everything in tags.xml
That didn't work the way I expected it to, though. It appears that the tagging functionality no longer works, but the "Tags" tab and the form for adding tags are still displayed on product pages.
How can I remove the tagging feature entirely, including the displayed 开发者_如何学Ctags and the add-a-tag form?
If you are using a local.xml then just use this code:
<remove name="product_tag_list" />
Using local.xml is the easiest way to modify your page. Also the best way btw. Better then just disabling it via backend. Via xml it doesn't load so in the end performance of your shop is better.
Easy one :) Just add following in local.xml (inside layout tags).
<catalog_product_view>
<reference name="product.info.additional">
<action method="unsetChild"><name>product_tag_list</name></action>
</reference>
</catalog_product_view>
which tag.xml did you comment out? The one in your custom theme or the default? You need to do both, otherwise the default layout simply reinserts the values you omitted.
The <catalog_product_view>
node in tag.xml is the one you are interested in.
I suggest that you read the article @Alan wrote on Magento XML Layout and install the LayoutViewer extension (or buy CommerceBug) to check that the layout updates are not being inserted then report back here if you still have questions.
HTH,
JD
1) Copy "tag.xml" file from below location to your custom theme and remove below code. app\design\frontend\base\default\layout\tag.xml
<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>
OR 2) To disable tags from admin you need to follow below option. Admin: System > Configuration > Advanced > Advanced > Disable Modules Output > Mage_Tag = Disable.
精彩评论