Conversion from object to TemplateBlock