Update template variable in view