Extends templateData adding a function for generating html links based on a document's id