Ok, i will test this!
I didn't mean, if it's possible to get the routes from config files, i meant
that the config file should be written by a script, e.g. a config file
already exist then you change something via browser-'admin-area', the
changes should directly be written to ini-file, alright i could implent a
script myself, but the framework is so comfortable ;) that there has to be a
method which give me exactly this possibility :D
Kind regards, Dennis
Jack Sleight wrote:
>
> 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
>
>
--
View this message in context:
http://www.nabble.com/Building-a-CMS-with-ZendFramework---problems-at-startup-tp18144799p18174960.html
Sent from the Zend Framework mailing list archive at Nabble.com.