simplify render with template and make templateBody configurable