Advance template engine