Put the template tags in the right order