private string GetImageUrl(EntryContentBase product, UrlResolver urlResolver) { var mediaReferences = product.AssetImageUrls(); if (mediaReferences != null && mediaReferences.Any()) { var media = mediaReferences.FirstOrDefault(); var mediaUrl = urlResolver.GetUrl(media); return mediaUrl + "?preset=imagenarrow"; } return string.Empty; }
private string GetImageUrl(EntryContentBase product, UrlResolver urlResolver) { var mediaReferences = product.AssetImageUrls(); if (mediaReferences != null && mediaReferences.Any()) { var media = mediaReferences.FirstOrDefault(); var mediaUrl = urlResolver.GetUrl(media); return(mediaUrl + "?preset=imagenarrow"); } return(string.Empty); }
public static List <ContentReference> AssetImageReferences(this HtmlHelper html, EntryContentBase entry) { return(entry.AssetImageUrls()); }
public static List<ContentReference> AssetImageReferences(this HtmlHelper html, EntryContentBase entry) { return entry.AssetImageUrls(); }