modify markup from templates