Ejemplo n.º 1
0
        protected virtual IEnumerable <IPage> GetIncludesFromModel(IPage page, Localization localization)
        {
            List <IPage> result = new List <IPage>();

            string[]             pageTemplateTcmUriParts = page.PageTemplate.Id.Split('-');
            IEnumerable <string> includePageUrls         = SiteConfiguration.GetIncludePageUrls(pageTemplateTcmUriParts[1], localization);

            foreach (string includePageUrl in includePageUrls)
            {
                IPage includePage = GetPage(SiteConfiguration.LocalizeUrl(includePageUrl, localization), localization);
                if (includePage == null)
                {
                    Log.Error("Include Page '{0}' not found.", includePageUrl);
                    continue;
                }
                FullyLoadDynamicComponentPresentations(includePage, localization);
                result.Add(includePage);
            }
            return(result);
        }