Add item loop to template