I want to get the current url of an admin panel page. I tried the folowing.
$currentUrl = Mage::helper('adminhtml')->getUrl();
But it's not returning the current url.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
When we see url in magento admin we can see it is formed with secret keys and cannot be accessed without that, below is the simple way to get any url for admin with keys.
echo Mage::helper("adminhtml")->getUrl("module_name/controller_name/action_name/",array("param1"=>1,"param2"=>2)); Mage::helper("adminhtml")->getUrl("adminshipper/process/index");
but to get current url use
echo $magentoCurrentUrl = Mage::helper('core/url')->getCurrentUrl();