added mapping in the middleware view to allow specific resource type to use their own template page