CakePHP 1.3 Plugin Shortcut Route

Posted by Cake Baker on Stack Overflow See other posts from Stack Overflow or by Cake Baker
Published on 2010-09-20T02:23:45Z Indexed on 2010/12/25 10:54 UTC
Read the original article Hit count: 320

Filed under:
|
|
|
|

Hi,

I searched a lot around the web but I couldn't find any specific sollution to this.
In CakePHP 1.3, different from 1.2, if you had a controller inside a plugin, and both had the same name, you could access through "<plugin>/<action>", and it would call the 'default' controller. But in 1.3, according to this:

http://cakeqs.org/eng/questions/view/setting_up_magic_routes_for_plugins_in_cakephp_1_3

It was removed, and only the 'index' action in the default plugin controller can be accessed this way.

I thought about adding extra code in my routes.php file, and loop through all the plugins in my app, making such routes for every action in the controllers named after the plugin, but it doesn't seem like it's the right thing to do...

any other suggestions to make this work in 1.3? or at least some very specific code documentation of this particular change? I've already read something in the 1.3.0-RC4 annoucement, but it was not clear enough..

thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about plugins