Template parser supports loops and ifs