I am using for one application multiple routes. I am trying to actually
merge two of them:
Route type:
:type/:rank/:page
and
Route type2:
:category/:type/:rank/:page
Idea is to make actually only one route, in case there is no category
set not to be used a default value (let's say 0) but rather the
assembled url to look similar with type. In case the category is set
then the assembled url to look similar with type2. I don't want to
change the order of routes params.
I am trying to make only one route to keep as few routes as possible,
and also to make easier to work with just one route, supplying only the
params we have, and not everywhere to have an if - else to switch
between those two routes...
--
Best regards,
Cristian Bichis
www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
没有评论:
发表评论