Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Am i misunderstanding how this works.The line in Bold does not work, all the others work fine.
<img src='@Model.Content.GetCropUrl(propertyAlias: "image", width:100, height:100 )'/> @foreach(var item in @Umbraco.Content(1143).Children().Where("Visible")){ <img src='@item.image.src' /> <img src='@item.Content.GetCropUrl(propertyAlias: "image", width:100, height:100 )'/>}
Hi Brian,
Just a mixture of typed and dynamic models, for this option you need to use typed.
Try this:
@foreach(var item in Umbraco.TypedContent(1143).Children().Where(x => x.IsVisible())) { <img src='@item.GetCropUrl(propertyAlias: "image", width:100, height:100 )'/> }
Jeavon
To use the dynamic model you can do this
@foreach(var item in Umbraco.Content(1143).Children().Where("Visible")) { var myImageUrl = ImageCropperTemplateExtensions.GetCropUrl(item, propertyAlias: "image", width:100, height:100); <img src='@myImageUrl'/> }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with 7.1.1 Image Cropper
Am i misunderstanding how this works.
The line in Bold does not work, all the others work fine.
<img src='@Model.Content.GetCropUrl(propertyAlias: "image", width:100, height:100 )'/>
@foreach(var item in @Umbraco.Content(1143).Children().Where("Visible"))
{
<img src='@item.image.src' />
<img src='@item.Content.GetCropUrl(propertyAlias: "image", width:100, height:100 )'/>
}
Hi Brian,
Just a mixture of typed and dynamic models, for this option you need to use typed.
Try this:
Jeavon
To use the dynamic model you can do this
is working on a reply...