What you might be interested in is prefix routing.
http://book.cakephp.org/view/39/configuration#routes-configuration-46
On Mon, May 19, 2008 at 5:41 PM, benjam <[EMAIL PROTECTED]> wrote:
>
> I'm having a menu problem, I have a section of my site which 'wraps'
> several controllers and models, therefore, while doing things in this
> section, the menu I have created with $menu->menu breaks (the current
> menu tab highlighting is incorrect) because my URL keeps changing,
> although I am in the same 'section' of the site.
>
> I figured I could fix this with routes and and have a route set up as
> the following... (/training is the topmost dir for the section)
>
> Router::connect('/training/:controller/:action/*', array('controller'
> => 'lessons', 'action' => 'index'));
>
> which basically clones the entire site at /training/*
>
> This is fine for the moment, because using the menu will take people
> back out of the /training dir. But my question is this...
>
> How (if it's possible), can I limit the controllers allowed to go
> through the /training dir? I only have four controllers that I want
> to have access to the /training dir, all other requests should show an
> error, or better yet, redirect to the proper controller directory.
>
> As it stands, I can enter the /training section by simply typing /
> training/some_other_non_training_controller, which is not bad, but it
> would break the menu the other way, instead of always losing focus on
> the 'Training' tab, it would always show focus on the 'Training' tab.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---