Process Download Links In Output

In SDL Tridion, creating links towards downloadable Binaries (Multimedia Components) in a Rich Text Field of a component, generates a ComponentLink instead of a BinaryLink on the presentation server. These multimedia components being rarely inserted directly on a Page, the ComponentLink does not get resolved on the front end, and your link will not appear on your page.
This TBB solves this by specifying the type=�Binary� attribute to the links which are pointing to Multimedia Components with a certain File Extension. You can set the file extensions to handle thanks to a template parameter. On top of this, the linked Multimedia Components which are not present in the Package, will be added so that they get published to the presentation server thanks to the �Publish Binaries In Package� TBB which is part of the �Default Finish Actions�.
This solution has not been tested on a production environment, and should therefore be tested and rather considered as an example or a quick start to handle download links in SDL Tridion.

The links appear on the page (.aspx or .jsp) and point to the published Binary file, so that you can navigate to it or use the standard browser functionality �Right Click=> Save As�, making it possible for your visitors to download PDFs, Word and Excel documents, compressed files and more.

Installation procedure and usage

� Download the BBX zip file attached an unzip it
� Use TcmUploadAssembly.exe from a command line prompt to upload the assembly to SDL Tridion. For more details, please use TcmUploadAssembly.exe /?
� Make sure the parameters are correct, such as the path to the tcmuploadassembly.exe file, /targeturl (Content Manager Url), /folder (Folder Uri) and finally the path to the ProcessDownloadLinksInOutput.dll

� Alternatively, you can also open the Visual Studio 2010 project file and compile the project. Make sure to enter the correct parameters for the Post Build event in the Properties of the VS project.

� Create a Parameters Schema and associate it with the �Process Download Links In Output� TBB.
� This is optional, by default the TBB will create download links for the following extensions:


� Open the Template Builder and add this TBB to the desired Component Template, before the �Default Finish Actions� TBB
� Add the file extensions in the Parameters section, coma separated, then run the template and save it.

License agreement
:    2011,  extension,  download,  links
:   1.0
:   Yes

About the Author
Philippe Conil
Sales Engineer

Philippe Conil is part of the North America's presales team, helping customers to make the most of our products. Philippe joined SDL Tridion in 2008, and as a certified Technical Consultant has been involved in numerous customers' projects in both Europe and the US.

SDL CMT division

Most Popular Building Blocks

These are the most popular Building Blocks. Did you already get them?