我正在关注this教程来创建自定义模块。出于某种原因,当我点击http://exmaple.com/helloworld/index/index时,我无法使用magento识别路由器(我收到Magento 404错误)。我已经确认在Admin中启用了该模块。这个tut config.xml和IndexController.php只有两个文件。先谢谢你!自定义模块路由器不被Magento识别
模块处于/代码/本地/拉斯/的Helloworld
/etc/config.xml
<config>
<modules>
<Russ_Helloworld>
<version>0.1.0</version>
</Russ_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Russ_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
控制器/ IndexController.php
<?php
class Russ_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
echo 'Hello Index!';
}
}
?>
的Magento 1.6.2
您是否将文件添加到应用程序/ etc/modules? – 2012-01-17 04:55:23
是的,我做到了。我能够在管理员的其他模块中看到自定义模块,并且已启用 – russjman 2012-01-17 04:57:39
在config.xml中中断XML并打开开发人员模式(请参阅index.php)。验证分析错误。 – benmarks 2012-01-17 05:18:03