Menu

Document Properties

A Document properties value contains metadata of the currently running template. There's only one of these in an evaluation process, which is always the value of the variable doc.

The Document properties of an Online template also acts as a Map containing all the Parts of the template. The key of each Part is its name and the value is the corresponding DAP Part. So, for example, an expression ${doc['Main']} resolves into the DAP Part "Main".  

Methods

getContentType() Resolves into a String that is the content type of the currently running template. This will resolve into null if content type has not been with the document tag.

For example, the expression ${doc.getContentType()} could resolve into "Dynamo template" if the template's content type has been set as such.  

Using the shorthand form the expression becomes ${doc.contentType}.
getDocumentMIME() Resolves into a String that is the MIME type of the currently running template.

For example, the expression ${doc.getDocumentMIME()} would resolve into "application/vnd.documill.dynamo.dap" in an Online template.

Using the shorthand form the expression becomes ${doc.documentMIME}.
getFileName() Resolves into a String that is the file name of the currently running template. This is the same as the name of the template but with file suffix included.

For example, the expression ${doc.getFileName()} might resolve into "Offer.dap" in an Online template named "Offer".

Using the shorthand form the expression becomes ${doc.fileName}.
getName() Resolves into a String that is the name of the currently running template.

For example, the expression ${doc.getName()} would resolve into "Offer" if the template is named like that.

Using the shorthand form the expression becomes ${doc.name}.

Comments

0 comments