Ejemplo n.º 1
0
        public void Initialize(InitializationEngine context)
        {
            DataFactory.Instance.CreatingPage += Instance_CreatingPage;

            var partialRouter = new BlogPartialRouter();

            RouteTable.Routes.RegisterPartialRouter <BlogStartPage, Category>(partialRouter);
        }
Ejemplo n.º 2
0
        public void Initialize(InitializationEngine context)
        {
            DataFactory.Instance.CreatingPage +=Instance_CreatingPage;

            var partialRouter = new BlogPartialRouter();

            RouteTable.Routes.RegisterPartialRouter<BlogStartPage, Category>(partialRouter);

        }
Ejemplo n.º 3
0
        public void Initialize(InitializationEngine context)
        {
            IContentEvents events = ServiceLocator.Current.GetInstance <IContentEvents>();

            events.CreatingContent += CreatingContent;

            var partialRouter = new BlogPartialRouter();

            RouteTable.Routes.RegisterPartialRouter <BlogStartPage, Category>(partialRouter);
        }
Ejemplo n.º 4
0
        public void Initialize(InitializationEngine context)
        {
            contentRepository = context.Locate.Advanced.GetInstance<IContentRepository>();

            events = context.Locate.Advanced.GetInstance<IContentEvents>();
            events.CreatingContent += CreatingContent;

            var partialRouter = new BlogPartialRouter();

            RouteTable.Routes.RegisterPartialRouter<BlogStartPage, Category>(partialRouter);
        }
Ejemplo n.º 5
0
        public void Initialize(InitializationEngine context)
        {
            // Get or create Blog Page
            var blogPage = _contentLoader.Service.GetChildren <BlogPage>(ContentReference.StartPage).FirstOrDefault();

            if (blogPage == null)
            {
                blogPage      = _contentRepo.Service.GetDefault <BlogPage>(ContentReference.StartPage);
                blogPage.Name = "Blog";
                _contentRepo.Service.Save(blogPage, EPiServer.DataAccess.SaveAction.Publish, EPiServer.Security.AccessLevel.NoAccess);
            }

            // Register partial router
            var partialRouter = new BlogPartialRouter(blogPage.ContentLink.ToReferenceWithoutVersion());

            RouteTable.Routes.RegisterPartialRouter <BlogPage, BlogArticle>(partialRouter);
        }
 public void Initialize(InitializationEngine context)
 {
     var partialRouter = new BlogPartialRouter();
     RouteTable.Routes.RegisterPartialRouter<BlogStartPage, Category>(partialRouter);
 }