use full image of cropper instead of crop, but typed, not dynamic
In some cases, it would be useful to use an image cropper image w/o any crops. In the cropper docs, this example works:
<img src='@CurrentPage.image.src'/>
In my case, I'm trying to use this in a foreach loop, so @CurrentPage is not the node I want. I've tried a bunch of different ways and although I get the basic structure (focal point, src, crops), I've been unable to use it with '.src', like:
it never knows what 'src' is. Trying a variation on @Umbraco.Field("myImageCropper").src, it throws the error:
'System.Web.IHtmlString' does not contain a definition for 'src' and no extension method 'src' accepting a first argument of type 'System.Web.IHtmlString' could be found (are you missing a using directive or an assembly reference?)
Is there a using I should be using? Some other fairy dust?
use full image of cropper instead of crop, but typed, not dynamic
In some cases, it would be useful to use an image cropper image w/o any crops. In the cropper docs, this example works:
In my case, I'm trying to use this in a foreach loop, so @CurrentPage is not the node I want. I've tried a bunch of different ways and although I get the basic structure (focal point, src, crops), I've been unable to use it with '.src', like:
it never knows what 'src' is. Trying a variation on @Umbraco.Field("myImageCropper").src, it throws the error:
'System.Web.IHtmlString' does not contain a definition for 'src' and no extension method 'src' accepting a first argument of type 'System.Web.IHtmlString' could be found (are you missing a using directive or an assembly reference?)
Is there a using I should be using? Some other fairy dust?
OTOH, one could make a super large 'crop' and use that like a crop, which makes sense but is not very gratifying...
Still like to know why 'src' doesn't work with typed media. Or rather, that I can't get it to work...
Thanks.
Hi Matthew,
Could you please post your full code to show how you are looping to set your variable.
Jeavon
is working on a reply...