SEO Tip - Changing Magento Product Review Page Titles
Out of the box, Magento doesn't set a page title for individual product review pages. This results in a missed SEO opportunity and many duplicate titles.
Here is a quick way to set the page title in the following format:
(Product Name) Review - (Review Title)In order to do this, open up the following file:
app/code/core/Mage/Review/Block/View.phpAdd in the following code:
/** * Set Page title */ protected function _prepareLayout() { $headBlock = $this->getLayout()->getBlock('head'); if ($headBlock) { if ($product = $this->getProductData()) { $title[] = $product->getName() . ' Review'; } if ($review = $this->getReviewData()) { $title[] = $review->getTitle(); } $headBlock->setTitle($title); } return parent::_prepareLayout(); }
If you do not want to modify core files, copy this file to:
app/code/local/Mage/Review/Block/View.phpThis has been tested and confirmed to work in Magento 1.3, 1.4.*, 1.5.0.1, 1.5.1.0
The Magento SEO Product Review URLs Extension by Iceberg Commerce has SEO Friendly URLs for all product review pages in addition to the SEO Friendly Page titles for product reviews that are outlined in this blog.


