Thanks Jack, but one question is still there!

It's not that problem to set up a route for the weblog, but when there's
something like:

-> http://example.com/contact
-> http://example.com/contact/disclaimer
-> http://example.com/references
-> http://example.com/references/webdesign/any_project
-> http://example.com/customers/webdevelopment/some_customer

I'm still having problems with that one, because all i'm thinking of is to
set static routes for it, but that's difficult to manage, even if the routes
are generated by config.
When i would try to build a route like this:

:category/:subcategory/:article

it collides with:

:category/:article

and of course with:

weblog/:category...

Is it right, that it is just possible to set a static route for it?
And if it is so, is there a possibiliy to change Ini files with
ZendFramework, so that i don't have to do it manually be editing it hard in
the file?

Regards, Dennis


Jack Sleight wrote:
> 
> 
> dennis.winter wrote:
>> I already thought of routes, but isn't it too varying for routes?!
>>   
> Nope :),
> 
> $router->addRoute('article', new Zend_Controller_Router_Route(
>     'weblog/:category/:year/:month/:day/:article',
>     array(
>         'module'     => 'blog',
>         'controller' => 'article',
>         'action'     => 'index'),
>     array(
>         'year'  => '\d+',
>         'month' => '\d+',
>         'day'   => '\d+')))
> 
> Requests to URLs matching that will be sent to the index action of the 
> article controller in the blog module. The parameters category, year, 
> month, day and article will be available via the _getParam() method of 
> the action controller. The third argument specifies that that year, 
> month and day values must be numeric in order for the route to match.
> -- 
> Jack
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Building-a-CMS-with-ZendFramework---problems-at-startup-tp18144799p18174005.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to