1

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
texai
  • 3,696
  • 6
  • 31
  • 41

1 Answers1

3

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.

jah
  • 2,056
  • 1
  • 18
  • 35