2009年7月20日星期一

[fw-mvc] Routing not working properly

I am new to zend framework... and in a big problemetic situation right
now....

I am making a website that has some categories displayed on main page..When
user clicks on a category he goes into category page with list of articles
in it...

And when user clicks on article he goes to article content page....

So my urls go like this
http://localhost/public/categoryname
http://localhost/public/categoryname/articlename
For a new article in that category...
http://localhost/public/categoryname/articlename/new

In my application.ini i am using
resources.router.routes.username.type = "Zend_Controller_Router_Route"
resources.router.routes.username.route = ":categoryname/:articlename/*"
resources.router.routes.username.defaults.controller = "category"
resources.router.routes.username.defaults.action = "index"
resources.router.routes.username.reqs.username = "[a-z0-9-]+"

it doesnt work....

if i use this.
resources.router.routes.username.type = "Zend_Controller_Router_Route"
resources.router.routes.username.route = ":categoryname/*"
resources.router.routes.username.defaults.controller = "category"
resources.router.routes.username.defaults.action = "index"
resources.router.routes.username.reqs.username = "[a-z0-9-]+"

it does not go beyond category controller page....

So here do i have to make one controller that is categorycontroller and
multiple actions under it or multiple controllers or do i need to
mention multiple routes which dint work when i tried...

Please help ....

Regards
Kusum


--
View this message in context: http://www.nabble.com/Routing-not-working-properly-tp24574375p24574375.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: