[NGRINDER-697]Use freemarker macro to make ftl more concise