Add option to view template to be compiled function