Esempio n. 1
0
        public static void LogPageShare(bool logShare = true, bool logComments = true)
        {
            Box.CMS.Web.ContentRenderView renderView = WebPageContext.Current.Page as Box.CMS.Web.ContentRenderView;
            if (renderView == null)
            {
                return;
            }

            string serverHost = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority;

            SiteService site = new SiteService();

            site.LogPageShare(renderView.HEAD, serverHost, logShare, logComments);
        }
Esempio n. 2
0
        public static IEnumerable <ContentHead> GetRelatedContents(string id = null, string location = null, string[] kinds = null, bool parseContent = false, int top = 0)
        {
            if (id == null)
            {
                Box.CMS.Web.ContentRenderView renderView = WebPageContext.Current.Page as Box.CMS.Web.ContentRenderView;
                if (renderView == null)
                {
                    return(new List <ContentHead>());
                }
                id = renderView.HEAD.ContentUId;
            }
            SiteService site = new SiteService();

            return(site.GetRelatedContent(id, top, location, kinds, parseContent));
        }