Added template attribute and template UI