Thanks..getting warmer. however why does it put it as a named param in
url?

if I do:

Router::connectNamed(array('project_name'));
Router::connect('/projects/:project_name/:action/*',
array('controller' => 'projects'), array('project_name' => '[-_a-zA-Z]
+'));

in view:
echo $html->url(array('project_name'=>$projects['Project']
['cat_name'], 'controller'=>'projects','action'=>'view')).'/'.
$projects['ProjectOverview']['slug'];

returns:
/projects/resales/view/project_name:resales/resales.html

what i'm looking for:
/projects/resales/view/resales.html

or even better -

/projects/resales/resales.html // view action
/projects/resales/overview.html // overview action
/projects/resales/maps.html // map action

Thanks again

On Nov 30, 5:49 pm, Aaron  Shafovaloff <[EMAIL PROTECTED]> wrote:
> Router::connectNamed(array('project_name'));
>
> Router::connect('/project/:project_name/*');
>
> That's a start
>
> On Nov 30, 1:27 pm, chad <[EMAIL PROTECTED]> wrote:
>
> > How could I achieve routing like so: /project/{project_name}/{action}/
> > * without any hacks in the controller? I have it working with some
> > hacks in the controller but would rather make it more dynamic in the
> > future and figured Router might help with that.
>
> > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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