Add support for dynamic template extension.