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;
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 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();
 }