Hi Dennis,
Ah OK, well in the case of :category/:subcategory/:article vs
:category/:article I'd use a regex route. Something like this would do
the trick (I've not tested this, or even checked the syntax is correct
here):
$router->addRoute('article', new Zend_Controller_Router_Route_Regex(
'^((?:[^/]+/?)+)/([^/]+)$',
array(
'module' => 'blog',
'controller' => 'article',
'action' => 'index'),
array(
1 => 'category',
2 => 'article')))
Then, in a request to category/subcategory/article you'd have two
parameters available, one called category which would contain
"category/subcategory" and one called article which would contain
"article". This way any number of subcategories can be specifed, and
the last part of the path is always marked as the article. Including
the weblog name would be a simple case of prepending it to the route.
See
http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.regex
Yes it is possible to configure your routes in an INI file rather than
hard code them. See
http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.add-config
--
Jack