Add template segments