I have created my custom module in magento at app/code/local/mycustom/GeoLocation, in that i want to create a observer so i had followed lot of tutorials and at last i had created below code to call it on every page load of magento but still it is not calling my observer.php of custom module.I am new to magento so please help me.
config.xml
<config>
<global>
<events>
<cms_page_render>
<observers>
<mycustom_GeoLocation_Model_observer>
<type>singleton</type>
<class>mycustom_GeoLocation_Model_Observer</class>
<method>getGeoLocation</method>
</mycustom_GeoLocation_Model_observer>
</observers>
</cms_page_render>
</events>
</global>
</config>
mycustomGeolocation_Event.xml for enabling module
<config>
<modules>
<mycustom_GeoLocation>
<active>true</active>
<codepool>local</codepool>
</mycustom_GeoLocation>
</modules>
</config>
At last my observer.php which is present in model of my custom module
class mycustom_GeoLocation_Model_Observer {
public function __construct()
{
}
public function getGeoLocation(Varien_Event_Observer $observer) { // current layout
$event = $observer->getEvent();
$cms_page = $event->getPage();
echo "called";
exit;
return $this;
}
}