Currently one of my routes looks like this

new Zend_Controller_Router_Route(
  'aviso/:url_id/:slug',
  array(
    'module' => 'postulante',
    'controller' => 'aviso',
    'action' => 'ver',
    'url_id' => ':url_id',
    'slug'=> ':slug'
  )
)

Now, I want to change the url part and use 'aviso/:slug-:url_id' instead of 'aviso/:url_id/:slug', how can i achieve this.

有帮助吗?

解决方案

You'll want to use Zend_Controller_Router_Route_Regex. If you read through that documentation you'll have enough info to construct the route you want. The very last example they provide is very close to what you need.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top