Dreamweaver GetFromDctm function

Use the Dreamweaver GetFromDctm function in your Dreamweaver Templates to identify specific renditions to be published from within HTML. The installer adds the Dreamweaver function to the Tridion.ContentManager.Config in the <functionSources> section.

Dreamweaver GetFromDctm function syntax

The GetFromDctm function has the following basic syntax:

@@GetFromDctm(tcmUri,renditionname,extension)@@

Dreamweaver GetFromDctm function parameters

The GetFromDctm function has the following mandatory parameters:

tcmUri
tcmUri represents a Multimedia Component with the ObjectId metadata field. If the field is a Multimedia Component Link field, you can use Fields.FieldName (do not use quotes).
renditionname
renditionname is the name of the Documentum rendition to use when retrieving the object, which will also be used as the Tridion VARIANT ID when publishing.
extension
extension is the file extension to use when publishing. The value is used to determine the Tridion Mime Type for this variant. If this extension is not configured, an error is logged and you must: add a Multimedia Type for the extension, configure the correct Mime Type, and republish.

Calling the GetFromDctm function from HTML tags

The HTML tag in which you call GetFromDctm must include the following Tridion attributes:

  • tridion:type="Binary" (optional)—instructs SDL Tridion to generate a BinaryLink object on the Content Delivery side which may be preferred for some file types but should not be used with images. The attribute is optional because the result of publishing this object is to create a Binary Variant.
  • tridion:variantid="<renditionname>" (mandatory)—identifies which Tridion Variant ID is used to retrieve this file. <renditionname> must match the renditionname specified in GetFromDctm.
Example 1
<a href="@@GetFromDctm(Fields.link,"pdf", "pdf")@@" tridion:variantid="pdf" tridion:type="Binary" >Click here to download a copy.</a>
Example 2
<img src="@@GetFromDctm(Fields.link,"jpeg_th", "jpg")@@" tridion:variantid="jpeg_th" />