Hi,
while porting our app to zend framework, I have stumbled across a
problem
I need to map:
http://localhost/en/review/die_hard/1/xyz/abc/321
en stands for language, and 1 for page number, other bold values are
optional.
so far, I am using
$route = new Zend_Controller_Router_Route_Regex(
'(.*)/review/(.*)/(.*)/*',
array(
'module' => 'public',
'controller' => 'Reviews',
'action' => 'review'
),
array(
'language' => 1,
'title' => 2,
'page' => 3
)
);
which works fine as long as the exact rule is matched, but fails if I
don't put the page number in. is there a way of specifying default
values for the parameters specified in bold (1/xyz/abc/321) or make
them optional in one rule ?
I don't really want to write this same route for every permutation...
any ideas?
Tomek