Set the layout template according to route.