Question

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

Was it helpful?

Solution 2

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);

OTHER TIPS

You can control this by editing cd_storage_conf.xml. In this file you can configure where binaries go for each publication. For example: you probably have something like this configured: <Item typeMapping="Binary" cached="false" storageId="myStorageId"/> and this myStorageId storage is defined inside the Storages element like:

<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory"
         Id="myStorageId" defaultFilesystem="true" defaultStorage="true">
    <Root Path="c:\temp\" />
</Storage>

If that is the case then you need to change the root path to point to the root of your WebApplication in IIS. More about how to configure the storage you have here (logon required).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top