Hi Hector
Thanks for the suggestions...
i tried these and it worked...
So now i am using routes
// article categories
:categoryname
// article content
:categoryname/:articlename
But now when i try
// new article
categoryname/:articlename/new
it doesnt get the new action in article controller
So does that mean i have to state all routes individualy in my config.ini
coz when i make route for
categoryname/:articlename/new
in ini it works....
This way i would have to make many routes.....
So i am confused ...
Please guide...
Regards
Kusum
On Mon, Jul 20, 2009 at 12:47 PM, Hector Virgen <djvirgen@gmail.com> wrote:
Try removing the /* at the end of your route. The /* means "match anything", so they may be conflicting.Try routes like this:// article categories:categoryname// article content:categoryname/:articlename
--
Hector
On Mon, Jul 20, 2009 at 10:44 AM, kusum <kusumsouls@sify.com> wrote:
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.
没有评论:
发表评论