Automatically detect correct template when using controllers within folders