You might consider using Quixote: it's quite minimal as frameworks go, and it's been used with templating libraries in the "sandbox" manner that you've mentioned. Take a look at http://quixote.ca/qx/TemplatingWithCheetah for an example. -- Graham