Thank you, I did and I had replied to it also with my previously
flawed method. However I needed something even more generic than what
you described. The link I posted on my original message describes
something similar. After a lot of playing around with the routes and
dumping the $this->params variable into the view I think I finally
figured it out. My route ended up looking like so:

Router::connect('/:game/:controller/:action', array('controller' =>
'[a-z]+', 'action' =>'[a-z]+'), array('game'=>'[a-z]+'));

Ended up having to define regular expressions for the controller and
the action also. I think this may have also fixed the issue with Form
helper, but I still have not tested that.

On Aug 25, 12:14 pm, biesbjerg <[EMAIL PROTECTED]> wrote:
> TAke a look 
> athttp://groups.google.com/group/cake-php/browse_thread/thread/1a53136e...
>
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to