private static string GeneratePreviewUrl(Item contentItem) { bool hasPresentation = WorkflowHelper.DoesItemHasPresentationDetails(contentItem.ID.Guid.ToString()); string previewUrl; // Generate preview link if (hasPresentation) { previewUrl = string.Format(Constants.PreviewUrlHasPresentation, HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, contentItem.ID.Guid.ToString().ToUpper(), contentItem.Language.Name); } else { previewUrl = string.Format(Constants.PreviewUrlNoPresentation, HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, contentItem.ID.Guid.ToString().ToUpper(), contentItem.Language.Name); } return(previewUrl); }