A utility for dealing with ids in templates.