averyvery / freeway

Simple Routing for EE
43 stars 4 forks source link

Same amount of variables. Different destinations. #9

Closed jsdgdo closed 12 years ago

jsdgdo commented 12 years ago

What could I do, If I have the same amount of freeway variables, but I need to go to different places? Like this:

temp-group/{{year}}/{{month}} => temp-group/list-temp/{{year}}/{{month}} temp-group/{{category}}/{{title}} => temp-group/news-body/{{title}}

averyvery commented 12 years ago

In that exact case, Freeway can't help you. In an ideal world, you could write:

  temp-group/{{year matches="\d{4}$"}}/{{month}} => temp-group/list-temp/{{year}}/{{month}}
  temp-group/{{category}}/{{title}} => temp-group/news-body/{{title}}

...but that's not a Freeway feature, and since Freeway's development is halted at the moment, it likely won't be. If you'd still like to use Freeway for this, you'd need to add something to the URL, like:

  temp-group/bydate/{{year}}/{{month}} => temp-group/list-temp/{{year}}/{{month}}
  temp-group/{{category}}/{{title}} => temp-group/news-body/{{title}}
jsdgdo commented 12 years ago

I did just that, I just forgot to post it. Thanks for the response!

averyvery commented 12 years ago

np — sorry it took me so long to respond; I must have missed the email notification.