Added support for templates in attributes.