Hi guys,
First time developing for kentico(8.1). i'm stumped as to how to get an image's url from an upload field on a document.
I have chosen to use aspx development in visual studio (beyond my control).
I have created a carousel web part, and associated it with ascx file.
I also created a page type called carousel. It has fields such as text, page selector and file upload(named image).
In the ascx, i have a repeater surrounded by the necessary html my front enders have created.
In the code behind, i make a query for carousel page types that exist in the content tree
`var carousels = DocumentHelper.GetDocuments("mysite.Carousel")
.OnSite("mysite")
.Path("/Carousels/%")
.Page(0,5);`
i bind these treenodes to my repeater
in my repeater i have access to my treenode and need to get a url for my image.
using treeNode.GetValue<string>("Image")
i can only get the GUID of the image that was uploading into the document using the field.
so my questions are:
how do i convert this guid into an image url? is there a better way to do this?
everything i've found in the documentation tells me to use transformations <%#GetImage("fieldname")%>. Am i able to use transformation code in development via visual studio?
also what is the difference between attachments to a document (has kentico 8.1 renamed documents to pages?), and file uploads defined in a page type?
sorry for the scatter brained questions, my google fu and researching the devnet documentation has finally hit a brick wall.