I am working on a module where i created some menu in Magento admin using adminhtml.xml

Now i want to link one of the menu to an external url and set target="blank". But i not sure how to do it in adminhtml.xml. Here is my code.

<?xml version="1.0"?>
                <convert translate="title">
                        <importmagmi translate="title" module="importexport">
                            <title>MagMi Importer</title>
                            <action><url helper="https://externalurl.com /></action>

When i am checking its adding current domain name before external url. ex: http://mydomainname.com/https://externalurl.com

I am wondering how to set only external URL?

1 Answer 1


Inside <action> tag you can put module/controller/action of your module.

Then create this action and put something like this:

public function locationAction()

See Mage_Core_Controller_Varien_Action::_redirectUrl for the standard redirect implementation in Magento controller actions.

  • I write in action node "external/controller/batchurl" . <?php class Demo_External_Adminhtml_ExternalController extends Mage_Adminhtml_Controller_Action { protected function batchurlAction() { $this->_redirectUrl('http://www.example.com/'); } } But not get the external url in the menu link.
    – Rat
    Apr 29, 2016 at 7:02
  • try <<frontname>>/external/batchurl. Don't forget to replace frontname with your real frontname from config. It can be demo, external or demo_external. So you may probably get external/external/batchurl
    – zhartaunik
    Apr 29, 2016 at 7:26
  • Please provide alternate for creating controller action and giving an anchor href directly onto the menu link. Dec 15, 2017 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.