Error: CS1061: 'Umbraco.Core.Models.IPublishedContent' does not contain a definition for 'Type' and no extension method 'Type' accepting a first argument of type 'Umbraco.Core.Models.IPublishedContent' could be found (are you missing a using directive or an assembly reference?)
Umbraco 6 - Media picker and crops
Hi!
@if(@slide.HasValue("slideImage")){ var mediaItem = Umbraco.TypedMedia(@slide.GetPropertyValue("slideImage")); <img src="@mediaItem.GetPropertyValue("umbracoFile")" alt="@mediaItem.GetPropertyValue("Name")"/> }The code above works great, and in Umbraco 4.11 I could get a crop by using .Replace, but this is not working:
<img src="@(mediaItem.Url.Replace("." + mediaItem.Type, "_person." + mediaItem.Type))" alt="@mediaItem.Name" />Kim
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.