public override ActionResult Index(RssNewsPage currentPage) { _model = PageViewModelBuilder.Create(currentPage); //Initiate Data InitiateData(); //Gets xml file from Rss source GetXml(); //Modify Xml Data ModifyXmlData(); //Add Rss List to model currentPage.RssItemList = _rssItemList; return(View(_model)); }
public override ActionResult Index(ControlPanelPage currentPage) { //Get the children of RssListNewsPage. Still of type CmsPage var pageCollection = PageFactory.GetChildrenForPageOfPageType(currentPage.PageId, typeof(ControlPanelLinkPage), PublishState.Published); //Creates list with pages of type RssNewsPage currentPage.ControlPanelLinkPageList = new List <ControlPanelLinkPage>(); //Iterates through pageCollection, converts cmsPages to RssNewsPages and adds them in NewsPageList pageCollection.ForEach(x => currentPage.ControlPanelLinkPageList.Add(x.ConvertToTypedPage <ControlPanelLinkPage>())); _model = PageViewModelBuilder.Create(currentPage); return(View(_model)); }
public override ActionResult Index(ArticleListPage currentPage) { _model = PageViewModelBuilder.Create(currentPage); // create our view model and parser var viewModel = new ArticleListPageViewModel(); viewModel.Heading = _model.CurrentPage.Heading.ToString(); viewModel.Ingress = _model.CurrentPage.Ingress.ToString(); /*var parser = new VueParser();*/ // in the real app you would use DI // in a real app, this would be placed somewhere in the base controller //viewModel.VueData = parser.ParseData(viewModel); _model.CurrentPage.ArticleListPageViewModel = viewModel; return(View(_model)); }
public override ActionResult Index(SportPage currentPage) { _model = PageViewModelBuilder.Create(currentPage); return(View(_model)); }
public override ActionResult Index(ArticlePage currentPage) { var model = PageViewModelBuilder.Create(currentPage); return(View(model)); }