I think maybe i'm a little dense today, but I just can't seem to get the url of the cropped thumbnails. The actual XML looks like this, however is there some easy way to get them using razor? @Model.photo.crop[0] is accessible but it seems I have to do some string manipulations to generate the url from the umbracoFile?
If the crop is empty, like in your example, you have to test first if the property "url" exists, which is something that's going to be included in the RC version that is going to be released today or tomorrow.
I'm not entirely sure why the URL isn't there considering I've uploaded, cropped, saved and published and confirmed the files exist on the server. Is there some reason why the URL property would be left off the crop node? I will test the jquery (thanks for the suggestion) but I assume it will return empty string.
Image Cropper as Upload Field on Document
I think maybe i'm a little dense today, but I just can't seem to get the url of the cropped thumbnails. The actual XML looks like this, however is there some easy way to get them using razor? @Model.photo.crop[0] is accessible but it seems I have to do some string manipulations to generate the url from the umbracoFile?
<umbracoFile>/media/624/img25large.jpg</umbracoFile>
<photo>
<crops date="27/02/2011 11:18:09">
<crop name="Thumbnail" x="51" y="180" x2="274" y2="353" />
<crop name="Large" x="420" y="23" x2="805" y2="431" />
</crops>
</photo>
How about @Model.photo.crop[0].url ?
If the crop is empty, like in your example, you have to test first if the property "url" exists, which is something that's going to be included in the RC version that is going to be released today or tomorrow.
Have a look at this topic as well.
Hi Lucuma,
If you're using uComponents, there's a helper method in uQuery to return the url of a specified crop.
HTH,
Hendy
I'm not entirely sure why the URL isn't there considering I've uploaded, cropped, saved and published and confirmed the files exist on the server. Is there some reason why the URL property would be left off the crop node? I will test the jquery (thanks for the suggestion) but I assume it will return empty string.
is working on a reply...