public IElementContent GetContent(IElementSettings settings, IPageContext pageContext, IUnitOfWork unitOfWork = null) { // Construct element content ShareContent shareContent = new ShareContent(); // Get this page's URL // UrlParameters urlParameters = new UrlParameters { RouteName = "ReadPage", RouteValues = new { pageid = pageContext.Page.PageId, description = pageContext.Page.Description } }; string url = _webHelperService.GetRequestUrl(); // _webHelperService.GetUrl(urlParameters); // Populate element content shareContent.PartialViewName = "Share"; shareContent.Description = _webHelperService.UrlEncode(pageContext.Page.Description ?? string.Empty); shareContent.Hashtags = _webHelperService.UrlEncode(string.Empty); shareContent.Image = _webHelperService.UrlEncode(string.Empty); shareContent.IsVideo = _webHelperService.UrlEncode(string.Empty); shareContent.Title = _webHelperService.UrlEncode(pageContext.Page.Name); shareContent.Url = _webHelperService.UrlEncode(url); // Return resulting element content return(shareContent); }