$this->getRequest()
$this->getRequest()->getActionName()
$currenturl = $this->helper('core/url')->getCurrentUrl();
strpos($currenturl, 'catalogsearch/advanced');
<?php
$currenturl = $this->helper('core/url')->getCurrentUrl();
if(strpos($currenturl, 'checkout/cart')):
?>
Get Magento Store Url
http://example.com/
<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>
Get Magento Skin Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN);
or you can write
$this->getSkinUrl();
calling skin url out side magento
Mage::getDesign()->getSkinUrl()
e.g:- http://yoursite.com/skin/
Get Magento Media Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
e.g:- http://yoursite.com/media/
Get Magento Js Url
Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_Js);
or you can write
$this->getJsUrl();
e.g:- http://yoursite.com/js/