adapted to new API for template-only views