Solving the “Customer Login” title in all pages in Magento

I’m one of those that wanted to add a login form on the sidebar of my Magento. This was really easy, I just add the following line to

<reference name="header">
<block type="customer/form_login" name="mini_login" template="customer/form/mini.login.phtml" />
</reference>

But after that, every page on my magento store showed the title page as “Customer Login”. This happened to me in Magento EE 1.10 and Magento CE 1.6.

Solving this is really easy, if you know how. Just copy the app/code/core/Mage/Customer/Form/Login.php file in a new folder into your local code, that is, create a app/code/local/core/Mage/Customer/Form/ and copy there the Login.php file.

After that, modify your new copy of Login.php, look for the _prepareLayout function and comment the line that sets the page title:

protected function _prepareLayout()
{
//$this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Customer Login'));
return parent::_prepareLayout();
}

That’s all!

One thought on “Solving the “Customer Login” title in all pages in Magento

Leave a Reply