Changed setCtxTemplate to call setCtxValue internally