3

How would I include the binary/file name of a multimedia component in the listvew?

I think I know where to add listview columns but what would the actual name be for the file to get it to show up in the header? enter image description here

  • 1
    Perhaps you could think about which file name you want to display. Do you mean the original (uploaded) file name? Keep in mind that when publish the binaries could/will have different filenames depending how you publish them. – Chris Summers Dec 26 '13 at 20:12
1

If I understand your question correctly you are trying to write the binary file name in the Title Column Header, I don't think it is the right place to do it since the list view will show multiple items. If you really want to do it, I would suggest to do it using javascript once the List View has changed its current selection so that you can load the item and using some DOM manipulation write the binary file name in the column header.

Check this post Loading List View Items. In that post I am explaining how to execute javascript code once you have selected an item in a List View. You can use a similar approach to load the Multimedia Component, get the Binary File Name and write it in the header.

  • Sorry, I would like to add an additional column that reflects the actual name of the binary file. column 1 header (Component Name), Column 2 (Binary name). – BryanD Dec 30 '13 at 16:00
  • I see, then you will need to add a new column via a GUI Extension and Data Extender, However be aware it will affect your performance since you will need to get a Binary File Name for each column when applicable. – Eric Huiza Dec 30 '13 at 16:13
  • I already have the Data Extender. Just need to know how to call the binary filename. I believe I would use "@Filename" but this is not working. I can easily get the schema id of the component by using "@SchemaId." – BryanD Dec 30 '13 at 17:42
  • You will need to add a new attribute called for instance FileName in the result (<tcm:Item ... FileName="" />), then you need to configure the Selector in your column (@FileName). – Eric Huiza Dec 30 '13 at 20:11
  • I understand the last part of this; configuring the Selector in the column but not sure about the result(<tcm:item... Which file does this exist in? – BryanD Dec 31 '13 at 16:17
0

I think what you're looking for is a custom data extender, as described in this excellent post: http://jaimesantosalcon.blogspot.nl/2012/04/sdl-tridion-2011-data-extenders-real.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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