move formatting of toggle key to template.php