1

Is it possible to modify/customize the Component "Info" tab details according to user. Please see the details below:

Component Info Tab

Now in above image, I want to show full path of Image like (d:\images\Chrysanthemum.jpg) "Original File:" as it was coming Tridion 2009.

Is it possible?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Manoj Singh
  • 7,569
  • 34
  • 119
  • 198
  • It's also a mystery to me why you would want to know the path to the image on the users desktop who uploaded it. Chris's reply and question is very good. What are your needs? You could always add an extra tab and from the image uri show anything you want (for example image size) – robrtc Jan 17 '13 at 21:42
  • Hi Robrtc...thanks...how can we add extra tab for images component so that it will have all images properties size, uploaded location, pixel – Manoj Singh Jan 18 '13 at 06:27

2 Answers2

2

Unfortunately these are ReadOnly fields set by the system.

If the item was uploaded using the SDL Tridion UI, this should contain the full path of the original image (I am surprised to see only the filename without the path), however it won't tell you from which editor's machine the path was on, so it is of very little use.

What are you trying to achieve and why? Perhaps someone can suggest a different approach.

Chris Summers
  • 10,153
  • 1
  • 21
  • 46
  • thanks chris for the reply!! actually these changes were recognized by our editors. We recently upgraded to Tridion 2011 and still fighting with some issues :)....well our editors compared the same info from Tridion 2009 with Tridion 2011 and found that image uploaded full path was not coming...there should some xslt which would be showing these information and if go there try do custom changes we can get top changes and ....as suggested by robrtc can we get image size and other details as well. – Manoj Singh Jan 18 '13 at 06:24
  • As Robert has said, you CAN add a new tab, but I am still not sure why you need the original file name and path - See Robert's article on creating a new tab, it will get you started: http://www.curlette.com/?p=753 - Once you have the tab, you will need to create a combination of JavaScript and a WebService (Model) to retrieve your data - Try looking at the PowerTools project for more examples. My ItemCommenting tool is a simple example of a tab calling a new model - http://code.google.com/p/tridion-2011-power-tools/ – Chris Summers Jan 18 '13 at 13:51
  • Hi Chris...actually editors just want to track from which location images was uploaded by them...so that in future they can see for there reference...well creating new tab would not solve my issue...what you say – Manoj Singh Jan 18 '13 at 14:15
  • In that case you might want to add the original path too the Component AppData when it is saved using the event system. You can then show that info using a GUI extension, or the existing AppData viewer in PowerTools. – Chris Summers Jan 18 '13 at 14:26
1

Showing extra image information, such as size and dimensions, is a great idea and a good candidate for a gui extension.

Your solution has 4 parts:

  1. Backend, talking with the Tridion API using Core Service to get the MM Image and perform size and dimension calculations. (maybe the dimensions could be calculated in javascript?). In the Core Service write some C# code to get the image from Tridion and calculate image size.

  2. Expose the backend call via a Web Service. I like to use ServiceStack.Net and create a very simple, thin web service on top of the C# code. If you create an asp.net web app and host the ServiceStack web service there then make sure to deploy it to a 'Web App' or Virtual Directory under the Tridion 2011 IIS site. This will help with any Post actions since it will use the same port # and not be considered cross-domain. Pluralsight has a great training video on Servicestack. Also, you can use Rest Console in the Chrome browser to test the web service.

  3. Call web service from an HTML page with jQuery. Create a small web form, serialize it with jQuery, and call the ServiceStack web service. The jQuery response will be a JSON object with image info.

  4. Create an ASCX control, configure Tridion to use it as a Tab extension. Copy/paste your working HTML / jQuery into the tab.

All done!

robrtc
  • 2,747
  • 1
  • 17
  • 22
  • HI Robrtc, thanks for sharing the idea...is there any website link to refer as well as how much it is going to impact the tridion performance as there could be lots of images uploading and opening the images component for update. – Manoj Singh Jan 22 '13 at 09:53
  • This extension will not impact normal usage of Tridion, unless you have many editors opening the images tab at the same time... This is a tab extension, and in the JavaScript you have different methods such as IsEnabled to place your call to the web service. I think if you hook into the right method then your call will only happen when the tab is selected. the new tab could show a 'loading' image while the ajax call is happening....Another idea is that you can show all the images on the page and then the user selects a button to get image info, which then calls the web service... – robrtc Jan 22 '13 at 10:00