I've created the following route in CakePHP:
Router::connect(
'/design-idea-projects/:filtertype--:id',
array('controller' => 'ourwork', 'action' => 'designideaprojects'),
array(
'pass' => array('filtertype', 'id'),
'id' => '[0-9]+'
)
);
In this route I want to make the part /:filtertype--:id
optional. How to do this? I'm not providing anything after /design-idea-projects/
, it is showing missing controller error. I'm really not getting any idea.
Thanks.
You can try this, hope it will work