开发者

Magento - local controller is not working

I have a question regarding Magento's local directory.

I am trying to override a core开发者_开发百科 controller - Mage/Contacts/controllers/IndexController.php.

So I copied IndexController.php to /app/local/Mage/Contacts/controllers/

but Magento is still using core file. I can confirm it because I see 404 page when I rename Mage/Contacts/controllers/IndexController.php to IndexController.php_.

Please advise me.

Thanks!


Copying a controller into the app/code/local path doesn't work unfortunately due to Magento's autoload architecture. It does work with Blocks, Models and other objects, but not controllers.

There is a detailed walkthrough of how to override a controller on the wiki. And a blog post by @prattski

Try following those, then come back with any specific questions.

HTH, JD

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜