You can easily know “where you are” using these fonctions :
in template / block files
$this->getRequest()->getRouteName(); $this->getRequest()->getModuleName(); $this->getRequest()->getControllerName(); $this->getRequest()->getActionName();
in class files
Mage::app()->getRequest()->getRouteName(); Mage::app()->getRequest()->getModuleName(); Mage::app()->getRequest()->getControllerName(); Mage::app()->getRequest()->getActionName();