templates: use output param to switch diff modes