Thank you a lot guys for your help!! I've now find another solution by using the Wrapper directive (http://template-toolkit.org/docs/manual/Directives.html#section_WRAPPER ) Where I can recursively parse the templates. I will now try to implement it with one of your solutions or with WRAPPER. Thanks!! Stefan