convert path to array; error for templates of same name