Greate! Thx, it works ;-)

On Mar 9, 3:52 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> You can convert the action name in webroot/index.php before the dispatching.
>
> Open the file, locate the line:
>
>         if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') {
>
> And insert *before* :
>
>         $tempUrl = explode('/', $_GET['url']);
>         if (isset($tempUrl[1])) {
>                 $tempAction = (Inflector::camelize($tempUrl[1]));
>                 $tempUrl[1] = strtolower(substr($tempAction, 0, 1)) . 
> substr($tempAction, 1);
>         }
>         $_GET['url'] = implode('/', $tempUrl);
>
> It works fine in my test machine.
>
> Also, I think this can be done in the .htaccess with a regexp, but I'm
> not sure about this.
>
> HTH,
> - Dardo Sordi.
>
> On Sat, Mar 8, 2008 at 8:39 PM, grassoalvaro <[EMAIL PROTECTED]> wrote:
>
> >  I just want urls (actions) like 'something_something_else' in all my
> >  controllers changing
> >  dynamically, because naming style of functions in my php code is
> >  somethingSomethingElse.
>
> >  (sorry for my poor english).
>
> >  On Mar 7, 2:58 pm, "Pablo Viojo" <[EMAIL PROTECTED]> wrote:
>
> > > On Fri, Mar 7, 2008 at 10:55 AM, Pablo Viojo <[EMAIL PROTECTED]> wrote:
> >  > > On Fri, Mar 7, 2008 at 5:44 AM, grassoalvaro <[EMAIL PROTECTED]> wrote:
>
> >  > > > Hi,
>
> >  > > > I was searching for solution but i didn't find anything. So, for
> >  > > > example:
>
> >  > > > class DictionariesController extends AppController
> >  > > > {
> >  > > >    function myAction()
> >  > > >    {
> >  > > >    }
> >  > > > }
>
> >  > > > I need smart solution to call myFunction when url is
> >  > > >http://host/dictionaries/my_action
> >  > > > and i need to do that for all my actions in all controllers. I was
> >  > > > trying to do that using __call() method in app_controller.php, but
> >  > > > didn't work.
>
> >  > > > Any idea?
>
> >  > > Try this at routes.php:
>
> >  > > Router::connect('/dictionaries/:action/*', array('controller' =>
> >  > > 'dictionaries'));
>
> >  > > And the defining any action you like in the controller.
>
> >  > > Regards,
>
> >  > After reading again, I don't  understand what you're trying to do. Can 
> > you
> >  > explain a bit more? BTW, what I propose is just the standard behavior of
> >  > cakephp so it's not really needed.
>
> >  > --
> >  > Pablo Viojo
> >  > [EMAIL PROTECTED]://pviojo.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to