Пример #1
0
        public static MvcHtmlString AssetUrl(this HtmlHelper html, EntryContentBase entry, UrlResolver urlResolver, IPermanentLinkMapper permanentLinkMapper)
        {
            var commerceMedia = entry.GetCommerceMedia();

            if (commerceMedia == null)
            {
                return(new MvcHtmlString(null));
            }

            return(AssetUrl(commerceMedia.AssetContentLink(permanentLinkMapper), urlResolver));
        }
        public static MvcHtmlString AssetImage(this HtmlHelper html, EntryContentBase entry, IPermanentLinkMapper permanentLinkMapper)
        {
            var commerceMedia = entry.GetCommerceMedia();
            if (commerceMedia == null)
            {
                return MvcHtmlString.Empty;
            }

            var contentLink = commerceMedia.AssetContentLink(permanentLinkMapper);

            return html.Partial(UIHint.Image, contentLink);
        }
Пример #3
0
        public static MvcHtmlString AssetImage(this HtmlHelper html, EntryContentBase entry, IPermanentLinkMapper permanentLinkMapper)
        {
            var commerceMedia = entry.GetCommerceMedia();

            if (commerceMedia == null)
            {
                return(MvcHtmlString.Empty);
            }

            var contentLink = commerceMedia.AssetContentLink(permanentLinkMapper);

            return(html.Partial(UIHint.Image, contentLink));
        }
        public static MvcHtmlString AssetUrl(this HtmlHelper html, EntryContentBase entry, UrlResolver urlResolver, IPermanentLinkMapper permanentLinkMapper)
        {
            var commerceMedia = entry.GetCommerceMedia();
            if (commerceMedia == null)
            {
                return new MvcHtmlString(null);
            }

            return AssetUrl(commerceMedia.AssetContentLink(permanentLinkMapper), urlResolver);
        }