Beispiel #1
0
        /// <summary>
        /// Works for Single Url Picker. Adds a link around some content. Will show only the content if link is not set.
        /// </summary>
        /// <param name="item"></param>
        /// <param name="content"></param>
        /// <param name="cssClass"></param>
        public static IHtmlString SurroundWithLink(this IHtmlString content, IEnumerable <Link> item, string cssClass = null)
        {
            if (item == null || content == null || !item.Any())
            {
                return(content);
            }
            var link = item.First();

            return(content.SurroundWithLink(link, cssClass));
        }