Search code examples
componentstridiontridion-2011multimediatridion-content-delivery

Configure the multimedia components to get published inside the website folder


Need to publish the JS and CSS files using multimedia components. The multimedia components gets published outside the website folder similar to the Images in

“C:\tridion\temp\pub14\Includes\scripts”

Any Idea How to Configure the multimedia components to get published inside the website folder.

We are using IIS to deploy website


Solution

  • You can overide the path of your multimedia binary using template code as long as you have structure group created for same path.

    Ex if you want to publish particular binary to \css\images folder, you first have to create the structure group for same path(\css\images) and use the structure group id in the following code to publish the binary.

    engine.AddBinary(Binary.Id, templateID, binaryStructureGroupID, Binary.BinaryContent.GetByteArray(), Binary.FileName);