Update template variable on template select.