public override ActionResult Index(ListingBlock currentBlock)
        {
            var contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>();
            var model             = new ListingBlockModel
            {
                Heading = currentBlock.Heading,
                Items   =
                    currentBlock.RootPage != null
                        ? contentRepository.GetChildren <PageData>(currentBlock.RootPage)
                        : null
            };

            return(PartialView(model));
        }
        public override ActionResult Index(ListingBlock currentBlock)
        {
            var contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>();
            var model             = new ListingBlockModel {
                Heading = currentBlock.Heading
            };

            if (currentBlock.RootPage != null)
            {
                model.Items =
                    EPiServer.Filters.FilterForVisitor.Filter(
                        contentRepository.GetChildren <PageData>(currentBlock.RootPage)
                        ).Cast <PageData>();
            }

            return(PartialView(model));
        }