Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Issue with upgrade to Epi 11 aroud Page Refernces

$
0
0

We're working to upgrade Epi 10 CMS to 11. We have alot of code like below.

When we run the site, landingPageConfig.GetLandingPageReference("AccessRequestForm"); now comes back NULL without any other changes to the site code, for the most part.

Where there big changes in Content Loading that we should know about?

        public Guid AccessRequestFormGuid
        {
            get
            {
                var landingPageConfig = ServiceLocator.Current.GetInstance<Business.ContentConfiguration.ILandingPageConfiguration>();
                var contentLoader = ServiceLocator.Current.GetInstance<IContentLoader>();
                var accessRequestFormReference = landingPageConfig.GetLandingPageReference("AccessRequestForm");
                var requestPageData = contentLoader.Get<StandardPage>(accessRequestFormReference);
                var formBlock = contentLoader.GetItems(requestPageData.MainContentArea.Items.Select(i => i.ContentLink), new LoaderOptions { LanguageLoaderOption.FallbackWithMaster() }).OfType<FormContainerBlock>().FirstOrDefault();
                return formBlock.Content.ContentGuid;
            }
        }

Viewing all articles
Browse latest Browse all 9076

Trending Articles