TAke a look at
http://groups.google.com/group/cake-php/browse_thread/thread/1a53136e5d9825de/5d8fb07be683c39e?lnk=gst&q=biesbjerg#5d8fb07be683c39e
On 25 Aug., 15:17, Adrian <[EMAIL PROTECTED]> wrote:
> I am working on a site that will need 3 themes, one each for the games
> the community is playing. After reading about custom routes I thought
> I had the brilliant idea of using prefix routes to set the variable of
> the game. So I set up 3 routes like so
>
> Router::connect('/jge/:controller/:action', array('prefix' => 'jge');
> Router::connect('/potbs/:controller/:action', array('prefix' =>
> 'potbs');
> Router::connect('/war/:controller/:action', array('prefix' => 'war');
>
> Each controller would then have an appropriately prefixed action that
> would set the flag indicating what game data the controller was
> supposed to use and then would call a more generic action to handle
> the actual processing. However this is not quite working like I
> thought it would and may turn out to be more work than is necessary.
>
> So I did some more searching and found this post here
>
> http://groups.google.com/group/cake-php/browse_thread/thread/debd9269...
>
> and I'm wondering if something like this may be possible:
>
> Router::connet('/:game/:controller/:action', array('game' =>'[a-z]+')
>
> Also, I seemed to have run into some issues with Form helper
> defaulting to the first prefix when creating the action attribute of
> the form despite not being in that path. For example I was playing
> around with the Auth component and accessed /users/login directly
> without any of the prefix paths, but this line
>
> $form->create('Login', array('action' => 'login'))
>
> automatically decided that the action for the form should be /jge/
> users/login. Is this supposed to happen?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---