Last active
March 13, 2019 12:23
-
-
Save mattbrailsford/5802a2234b3f804dc5611778ac86f93f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IPublishedContent GetGlobalContentNode() | |
{ | |
return (IPublishedContent)ApplicationContext.Current.ApplicationCache.RuntimeCache.GetCacheItem("Application.BusinessLogic.Services.GetGlobalContentNode", () => { | |
var settingsNode = GetNonPageContentNode(); | |
//Get the child folder node - Configuration Folder | |
var configFolder = settingsNode.Children.SingleOrDefault(x => x.DocumentTypeAlias == Constants.DocTypes.SiteConfigurationFolder); | |
if (configFolder == null) { return null; } | |
//Try & get the child External Services node | |
globalContentNode = configFolder.Children.SingleOrDefault(x => x.DocumentTypeAlias == Constants.DocTypes.GlobalContent); | |
return globalContentNode; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment