//MethodTemplateName=CSharp:Aras.TDF.ContentGenerator(Strict);
// get parent document
string doc_id = executionContext.DocumentId;
Innovator inn = this.Factory.InnovatorInstance;
Item thisDoc = inn.getItemById("tp_Block", doc_id);
if (!thisDoc.isError()) {
// get metadata we want to display from parent document
string num = thisDoc.getProperty("item_number","");
string rev = thisDoc.getProperty("major_rev","") + "." + thisDoc.getProperty("generation","");
DateTime d = DateTime.Parse(thisDoc.getProperty("modified_on",""));
string date = d.ToString("MMMM d, yyyy");
// add a new text element containing each metadata property to the targetElement
// targetElement is the element being created
targetElement.AddChild(this.Factory.NewText("Text", "Document : " + num));
targetElement.AddChild(this.Factory.NewText("Text", "Revision : " + rev));
targetElement.AddChild(this.Factory.NewText("Text", "Date : " + date));
}