I'm having trouble with getting my routes setup for a project I'm
working on.
See this thread for a little more background on the project:
http://groups.google.com/group/cake-php/browse_thread/thread/33544e08936fba4e/069109e06b3fca09?lnk=gst&q=a+better+way#069109e06b3fca09
Basically it has a main site, then sub-sites for the various venues.
So I'm wanting to setup prefixes for the venues and use them in
conjunction with the built in admin prefix routing.
For example, I'd like the url to look like: http://site/venue/controller/action
Which is easily setup, however I'd also like to use the admin prefix
with this i.e.:
http://site/admin/venue/controller/action or http://site/venue/admin/controller/action
I don't really care which way around
Now this all works fine except when I use the html helper to create
links, all links revert to: http://site/controller/action
So following the manual I add: 'venue' => true to the link
Which works fine for the non admin route but on the admin route the
links revert to something like:
http://site/users/view/1/admin_venue:1 using this code: echo $html-
>link(__('View', true), array('admin_venue' => true, 'controller' =>
'users', 'action'=>'view', $user['User']['id'], ));
My routes look like this:
Router::connect('/venue', array('controller' => 'pages', 'action' =>
'display', 'venue_home', 'venue' => true));
Router::connect('/venue/:controller/:action/*', array('controller' =>
'users', 'prefix' => 'venue', 'venue' => true));
Router::connect('/admin/venue/:controller/:action', array('prefix' =>
'admin_venue', 'admin_venue' => true))
What am I doing wrong here?
Thanks in advance for any tips.
-Brett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment