示例#1
0
        private static void Add404ErrorPage(PagesApiContext pagesApi, Layout layout, HtmlContentWidget header, HtmlContentWidget footer)
        {
            var pageRequest = new CreatePageRequest()
            {
                LayoutId = layout.Id,
                PageUrl = Urls.Page404,
                Title = "Page Not Found",
                Description = "Page Not Found",
                Status = PageStatus.Published,
                MetaTitle = "Better CMS page not found meta title",
                MetaDescription = "Better CMS page not found meta description.",
                MetaKeywords = "Better CMS"
            };
            var page = pagesApi.CreatePage(pageRequest);

            AddPageContent(pagesApi, page, header, footer, "<p>Oops! The page you are looking for can not be found.</p>");
        }
示例#2
0
        private static void AddDefaultPage(PagesApiContext pagesApi, Layout layout, HtmlContentWidget header, HtmlContentWidget footer)
        {
            var pageRequest = new CreatePageRequest()
            {
                LayoutId = layout.Id,
                PageUrl = Urls.DefaultPage,
                Title = "Better CMS",
                Description = "Better CMS main page.",
                Status = PageStatus.Published,
                MetaTitle = "Better CMS main page meta title",
                MetaDescription = "Better CMS main page meta description.",
                MetaKeywords = "Better CMS"
            };
            var page = pagesApi.CreatePage(pageRequest);

            AddPageContent(pagesApi, page, header, footer, "<p>Hello world!</p>");
        }
示例#3
0
        private static void Add500ErrorPage(PagesApiContext pagesApi, Layout layout, HtmlContentWidget header, HtmlContentWidget footer)
        {
            var pageRequest = new CreatePageRequest()
            {
                LayoutId = layout.Id,
                PageUrl = Urls.Page500,
                Title = "Internal server error",
                Description = "Internal server error",
                Status = PageStatus.Published,
                MetaTitle = "Better CMS internal server error meta title",
                MetaDescription = "Better CMS internal server error meta description.",
                MetaKeywords = "Better CMS"
            };
            var page = pagesApi.CreatePage(pageRequest);

            AddPageContent(pagesApi, page, header, footer, "<p>Oops! The Web server encountered an unexpected condition that prevented it from fulfilling your request. Please try again later or contact the administrator.</p>");
        }