add template resource code