tags:

views:

22

answers:

1

Hi,

I'm trying to create separate controllers for admin in my application. So far I've got something like this :

"/admin/article/$action?/$id?"(controller:"adminArticle")
"/admin/comment/$action?/$id?"(controller:"adminComment")

And so on for all the admin controllers. I would like to make it simpler, tried :

"/admin/$controller?/$action?/$id?"(controller:"admin" + controller[0].toUpperCase() + controller[1..-1])

and

"/admin/$controller/$action?/$id?"(controller:"admin$controller")

but neither of this solutions worked. Have you any idea how can I make this mappings more dynamic?

A: 

Maybe you should not use the word "controller". I didn't try it, but this could work:

"/admin/$contr/$action?/$id?"(controller:"admin$contr") // if first letter of contr is upper case
Daniel Engmann
Nope, I've already tried, it doesn't work.
arnvald