從指令的Alan's blog,我在config.xml中添加路由器:Magento管理控制器提供了404
<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<admin>
<routers>
<wellnesscoach_app_redirect>
<use>admin</use>
<args>
<module>Clean_Integration</module>
<frontName>appsync</frontName>
</args>
</wellnesscoach_app_redirect>
</routers>
</admin>
</config>
然後我在這裏app/code/local/Clean/Integration/Controllers/IndexController.php
定義我的控制器:
<?php
die('checkpoint1');
class Clean_Integration_IndexController extends Mage_Adminhtml_Controller_Action {
public function indexAction() {
$this->_redirectUrl('/appointments/sync/backend/');
die('checkpoint2');
}
}
當我試圖打開這個網址,它前往前端並拋出一個404.
什麼是導致magento不拿起這個管理路由器?
什麼是整合?它看起來像你重定向到一個單獨的應用程序? – benmarks
@benmarks無法在頂層菜單中添加外部鏈接,因此通過管理控制器重定向。 – Ashfame
哦,我明白了。 *是*限制。這**可以**只用* config.xml *和* system.xml *我認爲。 – benmarks