A document template that uses query macros enables documents to dynamically render links to a set of related documents. If new documents are added to the system that meet the query criteria, links to these documents are automatically added to the querying document. This feature is also called dynamic lists or automatic linking.