我在 Magento 管理面板中的模块具有类似http://example.com/index.php/mymodule/的 URL ...并包含带有订单的自定义网格。当他单击网格行时,我想将用户重定向到标准的“订单视图”页面。
public function getRowUrl($row)
{
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
return $this->getUrl('sales_order/view', array('order_id' => $row->getId()));
}
return false;
}
但是这个 URL 指向http://example.com/index.php/sales_order/view/ ... 而不是http://example.com/index.php/ admin /sales_order/view/... 有什么建议吗?
UPD。配置.xml:
<admin>
<routers>
<mymodule>
<use>admin</use>
<args>
<module>Foo_Mymodule</module>
<frontName>mymodule</frontName>
</args>
</mymodule>
</routers>
</admin>