문제

I'm trying to create a clone ( http://site.com/indexclone ) for http://site.com/index, but I also want all actions to be functional as they are in IndexController and potential parameters that are passed to original controller. I've figured out so far:

resources.router.routes.indexclone.route = "indexclone/:action"
resources.router.routes.indexclone.defaults.controller = "index"
resources.router.routes.indexclone.defaults.action = "index"

Please help me figure out the dynamic approach to the parameters list. Thank you in advance!

도움이 되었습니까?

해결책

You can do this:

resources.router.routes.indexclone.route = "indexclone/:action/*"
resources.router.routes.indexclone.defaults.controller = "index"
resources.router.routes.indexclone.defaults.action = "index"

But if don't solve your problem you can use the bootstrap to create a dynamic router.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top