In the Tridion templating manual (I'm looking at 2009 SP1) it explains that you can use either tridion:type='Binary'
or tridion:type='Multimedia'
. Apparently Binary allows you to specify a variant, and Multimedia allows you to use the tridion:targetattribute
attribute.
Neither of these differences seems to justify an extra type, so there's obviously more to it than that. The documentation says:
If set to Binary, the hyperlink points to the binary file contained within the Multimedia Component, which means that the link points to the actual published binary file and not the Content Manager URI of the item.
But a link of type Multimedia also points to the binary itself.
The documentation also notes that if type Multimedia is used, you have to publish the multimedia component in the same publishing action for the link to be resolved.
What are the underlying mechanisms at play here, and what criteria should I apply to choose between Binary and Multimedia?
I found some other documentation that says:
tridion:type, the type of link to be created.
The value can be Page, Component or Binary, although any other value will just be copied over (default is either Component or Page, depending on destination URI). The value can also be Multimedia, in this special case the original element is retained, only the target attribute of the published path of the MultiMedia component associated with the component referenced in tridion:href is replaced.
From reading some of the documentation and looking at the code, it seems like tridion:type=Multimedia
doesn't generate TCDL. Instead it looks for the "PublishedPath" of the item in the package and puts than into the Output. In that sense it is quite similar to the PublishBinary call of the good-old Script Assistent.
If you have access to the forum you can get the source code for the default TBBs here. The source of the link resolver TBB contains all the explanation you need. Essentially type="Binary"
is for links (<a href=...
) to Multimedia Components, while type="Multimedia"
is for other references to Multimedia Components, e.g. <script src=...
, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With