use_template function

[EXPERIMENTAL] Create new output function based on a template.