I'm pulling my hair for this one.
I want to get the source path to the image (whithout any crop) so i can show the fullsize image in a fancybox. The property src on productImage does hold the path to the original image but I can't seem to access it.
In this code i'm trying to iterate through a list of products but am unable to get the "src" to the image.
CODE
@foreach (var product in CurrentPage.ProductCategories.First().Children().Take(3))
{ <p>@product.productImage</p> }
You are correct it's beacuse I changed from an Upload to an Image Cropper and you have to "touch" the focalPoint or update the image for it to update to a Image cropper type.
Image cropper getting original image/url
Hello
I'm pulling my hair for this one. I want to get the source path to the image (whithout any crop) so i can show the fullsize image in a fancybox. The property src on productImage does hold the path to the original image but I can't seem to access it.
In this code i'm trying to iterate through a list of products but am unable to get the "src" to the image.
CODE
OUTPUT
As i understand this is beacuse it is in dynamic content and i need it to be typed.
However when I'm not iterating through the CurrentPage I get the desired result.
CODE
OUTPUT
What am i missing?
Hi Fredrik,
If you are using Umbraco v7.1.2 you can do this:
Assuming "product" is a typed object
Before v7.1.2, you can do this
Jeavon
Hello Jeavon
I'm using 7.1.0 and using
gives me exception
Error parsing comment. Expected: *, got m. Path '', line 1, position 1.
It seems to read the json as comments allthough the pure output of the GetPropertyValue looks like this.
So i tried to save the string and use it and it works.
But it throws the same exception with
I think this might be slightly different issue as detailed here http://issues.umbraco.org/issue/U4-4756
Can you check that every image in your loop has the full JSON or does one have only partial data?
You are correct it's beacuse I changed from an Upload to an Image Cropper and you have to "touch" the focalPoint or update the image for it to update to a Image cropper type.
Thank's for the help :)
/Fredrik
Great!
is working on a reply...