TemplateElement model & editing