Binary links
Binary links point to binary files such as images, PDF documents, Word documents, and so on stored in Multimedia Components. You can create a binary link in a Component as a Multimedia Component Link field, in a Format Area field, or in template code.
When a Page is published that contains binary links, the Link Resolver default Template Building Blocks generates linking code to binary files. The Link Resolver Template Building Block resolves links to binary items in the HTML or XHTML of the Output item in the input package and makes links to Components and Pages ready for publishing. If the binary was never published, no link is created.
- Multimedia Link
- A content author can set the value of a Component field of type 'Multimedia Link'. The default Templates that SDL Tridion Sites ships with render this as a hyperlink to the published binary resource.
- Format Area
- In a Component field of type Format Area, a content author can click the Hyperlink button, select Component as a link type, and pick a Multimedia Component to link to. The Link Resolver default Template Building Block renders this as a hyperlink to the published binary resource.
- Template code
-
You create a binary link by using the
getLinkAsStringmethod in theBinaryLinkclass in Template Building Block code and including this code in a Component Template or Page Template.