Hi
Is it possible to create a route with a wildcard “in the middle” which represents an unknown number of parameters when a named parameter is also at the end? The unknown parameters should be passed to $this-params->pass.
An example to make this a litte clearer. So the route is:
Router::connect(’/products/*/:section’, array(‘controller’ => ‘categories’,‘action’ => ‘sets’,‘language’ => ‘eng’),array(‘named’ => array(‘section’)));
So * represents a unknown count of parameters. It could be:
/products/cat1/cat2/cat3/:section
or
/products/cat1/:section
and so on.
This routing below would do the job, but it would be much nicer if the section is at the end.
Router::connect(’/products/:section/*’, array(‘controller’ => ‘categories’,‘action’ => ‘sets’,‘language’ => ‘eng’),array(‘named’ => array(‘section’)));
Hope this is possible…
Thanks,
Frank