conditional objects in templates