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
Hi,
I am struggling with trying to get the DAMP controls to work with crops.
Have got the image inserted into the showpostcshtml:
@{ dynamic media = Model.MediaById(Model.uBlogsyContentImage); <img src="@media.umbracoFile" alt="@media.nodeName" class="blogImage" />}
But getting crops in there is defeating me.
I am using the razor examples and have got it all going just fine when I am calling from @model
@{ if (Model.HasValue("uBlogsyContentImage")) { dynamic mediaItems = Model.uBlogsyContentImage.mediaItem; if (mediaItems.Count() != 0) { <ul> @foreach (var item in mediaItems) { var image = item.Image; <li> @{ var crops = image.mediaCropper; } @if (crops.GetType().ToString() != "System.String") { <img src="@crops.Find("@name", "Blog").url" alt="@image.nodeName"/> } </li> } </ul> } }}
I am struggling to fit in this code as I don't have @Model but a referenced value which doesn't return any values when I try and get the mediaItems.
var file = d.GetProperty("uBlogsyContentImage").mediaItems
I am sure I am getting mixed up between typed and dynamic syntax.
Basically I have a DAMP control
uBlogsyContentImage
That I want the crop "Blog" from
Any help would be much appreciated.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Ublogsy with DAMP and Crops
Hi,
I am struggling with trying to get the DAMP controls to work with crops.
Have got the image inserted into the showpostcshtml:
But getting crops in there is defeating me.
I am using the razor examples and have got it all going just fine when I am calling from @model
I am struggling to fit in this code as I don't have @Model but a referenced value which doesn't return any values when I try and get the mediaItems.
I am sure I am getting mixed up between typed and dynamic syntax.
Basically I have a DAMP control
That I want the crop "Blog" from
Any help would be much appreciated.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.