add template to has an element in table scope