Build a page that loads the text of the .tpl file into a text area. Then build a second page that takes the submitted text from the text area and overwrites the .tpl file. It's not difficult, but you'll need your .tpl's to be writable by the web server and that's a security risk, not a big one but still a risk.