add documentation on template nesting