Automatically discover template name for views