The Closures extension provides a way for users to define templates on the page they are needed through a parser function.