I try to think about what is the best practice of publishing binary file in a MM link field without coding like in the DW Template.

The background of this question is that I have a couple of on/off Image in each MM Link field of a Component.

One of them should be coded in the DW Template but the other is controled to dispay by javascript when hovering a cursor over the Image on the brouser.

Could you give me any idea for publishing both of 2 images when publishing a page?

  • I'd imagine the JavaScript needs a reference to the path as well. Can you reference both image IDs in the DWT and let the template resolve the paths and add them to the package? Commented Apr 1, 2013 at 22:17

2 Answers 2


You can manage these images through the CSS/JavaScript as they generally get handled in any web application and now you can publish these images referenced in the CSS/JavaScript at the time of publishing of CSS/javascript through a C# TBB in the template which is used with this CSS/JavaScript component. A lot of on-line articles are available for this.

  • Hi! Ram. Thank you very much for your answer. That is a great idea. But in my case, these images are if anything, "Content" rather than "Design". so better to manage in a Component each.Could you give me any idea in that case? Thanks in advance.
    – Naoki
    Commented Apr 1, 2013 at 11:07
  • Hi Naoki, Could you please brief your requirement(if possible Use Case) a bit more here for better suggestion. Commented Apr 1, 2013 at 11:41

Try following step by step approach that I have used in my last 6 projects:

1) Create a neat hierarchy for all such multimedia components that your are not using in DWT templates - (Say Building Blocks\Assets\Images, Building Blocks\Assets\Video etc.)

2) Create a corresponding structure group hierarchy - the hierarchy in which you want to publish your multimedia component - It may be existing or you may want to create a new one

3) Create a metadata schema with a text field and associate it with your multimedia component folders (Building Blocks\Assets\Images) - In the metadata field give TCM URI or WebDav URL of the structure group which will defines the location for publishing of your multimedia file

4) Create multimedia components based on Multimedia schema of your choice

5) Create a Component Template linked with these multimedia schema

6) Create a C# TBB which will extract the Multimedia component and publish to the location define by the metadata of the folder

7) Associate this C# TBB with your component template

Now direct publishing of your multimedia component will give you the desired results.


1) Easy Maintenance, Flexible and scaleable

2) High Useability


1) One time high investment in terms of effort (man-hours)

I hope it helps.

  • Sorry, I wasn't connecting this approach to the question but I think I get it. You're recommending having folder paths and a dynamic component template control the publishing of multimedia. This would let authors publish images independently, which I think removes the need for additional C# template code (going forward). How would you handle the requirement to publish these images from the page, though? Commented Apr 1, 2013 at 22:23
  • You are right in understanding the approach. We can think of publishing the images from page by using the Event System and publishing them with the above mentioned dynamic template dynamically using TOM.NET Commented Apr 2, 2013 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.