I created a local.xml file in app/design/frontend/custom_package/custom_theme/layout/ directory and added this code:
<?xml version="1.0" ?> <layout version="0.1.0"> <review_product_list> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </action> </reference> </review_product_list> <review_product_view> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </reference> </review_product_view> </layout>
When I reload review page html contains "index,follow". How can I solve?
Solved! Go to Solution.
Hi @GPutignano,
Your code has an error.
On review_product_view you are not closing the action node.
The right code should be:
<?xml version="1.0" ?> <layout version="0.1.0"> <review_product_list> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </action> </reference> </review_product_list> <review_product_view> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </action> </reference> </review_product_view> </layout>
Hi @GPutignano,
Your code has an error.
On review_product_view you are not closing the action node.
The right code should be:
<?xml version="1.0" ?> <layout version="0.1.0"> <review_product_list> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </action> </reference> </review_product_list> <review_product_view> <reference name="head"> <action method="setRobots"> <value>noindex, nofollow</value> </action> </reference> </review_product_view> </layout>
@Damian Culotta Many thanks. I updated the code, refreshed the cache but it doesn't work.
I've created a local.xml layout update into the rwd theme (a vanilla Magento installation) and has worked.
Maybe you have another module or layout update changing your theme?
I'll try to disable creareseo extension.
I was wrong with the name of the file, not local.xml but layout.xml. I apologize for the error.