예제 #1
0
        public void AddChildToIndex()
        {
            var page             = _site.CreatePage("Index/" + Guid.NewGuid().ToString());
            var mainContentBlock = new PageBlock();

            mainContentBlock.AddComponent(new HtmlContentComponent
            {
                Contents = "<div> <strong>I'm a index child</strong> </div>"
            });
            mainContentBlock.AddComponent(new SuperSimpleViewEngineTemplateComponent
            {
                TemplateLocation = Path.Combine(_dir, "Template.html")
            });
            page.AddBlock(mainContentBlock);
            page.Save();
        }
예제 #2
0
        public void SavePageInHelloWorldSite()
        {
            var page             = _site.CreatePage("TestPages/" + Guid.NewGuid().ToString());
            var mainContentBlock = new PageBlock();

            mainContentBlock.AddComponent(new HtmlContentComponent
            {
                Contents = "<div> <strong>XD</strong> </div>"
            });
            mainContentBlock.AddComponent(new SuperSimpleViewEngineTemplateComponent
            {
                TemplateLocation = Path.Combine(_dir, "Template.html")
            });
            page.AddBlock(mainContentBlock);
            page.Save();
        }