Basic templating logic.