Anyone have any idea why I can't rewrite the Mage_Page_Block_Html_Head block?
My config.xml file looks like this:
<config>
<modules>
<Mymodule_Robots>
<version>0.1.0</version>
</Mymodule_Robots>
</modules>
<global>
<blocks>
<page>
<rewrite>
<html_head>Mymodule_Robots_Block_Html_Head</html_head>
</rewrite>
</page>
</blocks>
</global>
</config>
If I have an XML error in the file it shows up in the error log, so the file itself is being loaded in but it isn't overriding the Block.
My block looks like this (but I'm got getting any errors about it not being found or anything like that):
class Mymodule_Robots_Block_Html_Head extends Mage_Page_Block_Html_Head {
public function __construct(){
#nothing logging
Mage::log('test');
}
/**
*
* Override robots link on certain pages.
* @return string
*
*/
public function getRobots(){
Mage::log('test');
if (empty($this->_data['robots'])) {
$this->_data['robots'] = Mage::getStoreConfig('design/head/default_robots');
}
return 'test'; // $this->_data['robots'];
}
}
It's an older version of Magento: 1.5.1