Created
February 13, 2019 12:49
-
-
Save hartviglarsen/84b1215dd565bfe7a9f1858a7535324a 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
| protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
| { | |
| TreeControllerBase.TreeNodesRendering += TreeControllerBase_TreeNodesRendering; | |
| } | |
| private void TreeControllerBase_TreeNodesRendering(TreeControllerBase sender, TreeNodesRenderingEventArgs e) | |
| { | |
| if (sender.TreeAlias == "content") | |
| { | |
| var shared = e.Nodes?.Where(x => x.Name == "Shared").FirstOrDefault(); | |
| if (shared != null) | |
| { | |
| e.Nodes.Remove(shared); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment