Zend router problem
Posted
by
Fluffy
on Stack Overflow
See other posts from Stack Overflow
or by Fluffy
Published on 2011-01-16T18:38:55Z
Indexed on
2011/01/16
18:53 UTC
Read the original article
Hit count: 195
Hi, folks.
I have some problems with zend routes
I have shops
controller.
It has 3 actions(for now):
- index - lists all of shops using paginator(so I have /shops/?page=2)
- show - shows concrete shop (show/Apple+store)
- search - shows search form
So now I need to make routing
for that.
I have followin routes
'shop', new Zend_Controller_Router_Route ('/shops/:title',array('controller' => 'shops', 'action' => 'show'),array('title' => '/^(?!search$).+$/'))
'search_shops',new Zend_Controller_Router_Route_Static ('/shop/search',array('controller' => 'shops', 'action' => 'show'))
but when i try to go /shops/Apple+store it says, that there is no Apple store action.
If I ommit regexp part on shop route
, I can't go to search.
What am I doing wrong?
© Stack Overflow or respective owner