Make constraints use template constant strings in getTemplate() method