jkh80
-
7/8/2009 1:09:26 PM
Using image selection fields - how do I get a file's URL given its GUID?
I have set up a document type that has a number of image selection fields. I am trying render the document in a template I have set up for this document type, but I am having trouble getting the image URL.
In the template I am working, I am using a DataRow object that represents the document, getting it like this:
DataRow row = CMSContext.CurrentDocument.DataRow;
I can access the image selection fileds I have set up this way, but they are only the GUIDs.
There is information in the documentation about how to get the URL in a transformation, but calling the same CMS.Controls.CMSAbstractTransformation.GetDocumentUrl(Object, Object) method in my template code-behind does not work.
I have also tried using the methods in the CMS.FileManager.AttachmentManager, also to no avail.
So, given a GUID, how do I retrieve information about the document? I just need the URL for the image document that the GUID represents, but if I can lode the TreeNode object from the GUID, that's fine as well.
Any ideas?
|