Add template and splice template